Proof-of-concept test service #5435
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This draft PR presents a working version of the work described in KR 3261363, and is meant to address feedback after some internal reviews of #5332
This proof-of-concept demonstrates how we can us a simple test service to simulate services such as STS and provide scenario-specific test configuration. With this set up each MSAL can have more consistent testing experience by centralizing configuration and mocked HTTP responses, all while using an API that can be easily spun up locally for new additions and quick adjustments.
This PR makes the following changes:
GenericAuthorityTests
to use the newConfigService
rather than local constants and mocked responses.TokenRevocationTests
class to show how it could be used for a scenario that is hard to test end-to-end (Service Fabric MI and token revocation)Much of the configuration here and in the test service was created as a first draft, good-enough-for-now implementation. The names of classes/methods/fields and all of the config in the test service are not final or made with any grand design in mind, and is very open to feedback.
N.B: currently these new tests only work when the API is running locally, so they will fail in the pipeline. The related PR in the ID labs repo must be merged in first.