[MGNLTEST-163] Make configurable list of test instances Created: 29/Apr/21  Updated: 13/Nov/21  Resolved: 09/Nov/21

Status: Closed
Project: Magnolia Test Framework
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0-cloud

Type: Task Priority: Neutral
Reporter: Ilgun Ilgun Assignee: Mikaël Geljić
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLTEST-174 Support authenticating via OpenID Con... Closed
relates to MGNLREST-323 Provide a standard ImportEndpoint for... Closed
dependency
supersession
is superseded by MGNLTEST-188 Consolidate support for external inst... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: SaaS ITs
Sprint: Cloud Service 8, Cloud Service 16, Cloud Service 17, SaaS 19, SaaS 21
Story Points: 8

 Description   

AC

  • configurable list of instances we want to access in tests
  • each instance have properties host, port etc. configurable
  • instance configuration contains configuration of filters like BasicAuthenticationFilter for MagnoliaRestClient


 Comments   
Comment by Mikaël Geljić [ 29/Apr/21 ]

MagnoliaRestClient uses superuser:superuser basic auth by default. And since superuser is not available in CS, we get redirected to the login screen (despite error output not really obvious though).

Some ideas for what would be needed here in test-framework:

  • pass a Client to MRC, or implement similar builder-style as for MagnoliaHttpClient#user—if not a generic MagnoliaClientBuilder that takes host & user and can return either REST client or HTTP client.
  • on the other hand, the test itself is not the one which needs this, but the fixture extensions do. So the annotations would require a (super)user attribute.

re: MRC refactoring, the notion of Instance does not make much sense in the cloud case, because they run on different hosts, so indeed we might want to pass multiple arbitrary hosts to work with (in addition to the convenience enum).

Comment by Mikaël Geljić [ 26/Aug/21 ]

Commits are already merged to the feature branch for some time, finally proceeded with further review:

  • We don't have good conventions yet for naming MP Config keys, but would suggest magnolia.test as prefix
  • DirectInstances terminology sounds legacy or too technical to be used for defaults, pbly sth like DefaultInstances?
  • Backwards compatibility: we accept that @Fixture, @Cleanup annotations' instances parameter type is moving from enum to plain Strings. We also wanted to deprecate the constants or enum members prefixed with 'DIRECT_' anyway, so tests will need an update, worth doing it in one go.
  • Can @WithName smallrye annotations be replaced with MP config annotations?
  • InstancesManager may be an injectable component w/ MP config mappings, so we resolve config only upon init; might also expose the instance stream or collection to facilitate functional operations.

I'll prepare a tentative PR with some of these changes.

Generated at Mon Feb 12 07:46:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.