vorto
vorto copied to clipboard
Create OAuth Provider Mock to Use in Tests
#2529 already required me to write some basic provider mocks.
- In the unit tests, the
IOAuthProviderRegistry
is mocked, and contains a mockedIOAuthProvider
that "looks like" GitHub (since all test users are mock GitHub users to start with). - In the integration tests, the
IOAuthProviderRegistry
is replaced with a@Primary
mock bean in the configuration, and it contains the same mock "Github-ish"IOauthProvider
as in the unit tests.
I think these changes provide a base for this (#2697) task, but they are not sufficient on their own to fulfil its goal, i.e. in my opinion, to be able to emulate more complex situations, first and foremost username collision with different OAuth providers.
Bottomline, I think this task should be started once #2529 is done.