Add tests for RemoteResourceRetrieverFunction behavior#482
Merged
Conversation
bdc5b70 to
17a5b34
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
RemoteResourceRetrieverFunctionfollow the documented behavior of returning the response body when present or theLocationheader when the server responds with a redirect.Description
vck-openid/src/commonTest/kotlin/at/asitplus/wallet/lib/RemoteResourceRetrieverFunctionTest.ktwith unit tests exercising the retriever behavior.FakeRemoteResourceRetrieverandFakeHttpResponsein the test to simulate responses with a body or aLocationvalue.RequestParserwhen present (request_uricase) and a test asserting that aLocationredirect is followed byWalletServicewhen fetching acredential_offer_uri.RequestParserandWalletServiceinstances inside the tests to validate the end-to-end behavior.Testing
vck-openid/src/commonTest, specifically two tests validating body-first and location-redirect behavior.Codex Task