vorto icon indicating copy to clipboard operation
vorto copied to clipboard

Create OAuth Provider Mock to Use in Tests

Open kolotu opened this issue 4 years ago • 1 comments

kolotu avatar Nov 11 '20 09:11 kolotu

#2529 already required me to write some basic provider mocks.

  • In the unit tests, the IOAuthProviderRegistry is mocked, and contains a mocked IOAuthProvider 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.

ghost avatar Nov 24 '20 09:11 ghost