Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Consider making StandardTokenExchangeV2Test to be independent of StandardTokenExchangeV1Test #37105

@mposolda

Description

@mposolda

Right now, we have AbstractStandardTokenExchangeTest and 2 subclasses of it:

  • StandardTokenExchangeV1Test for token-exchange V1
  • StandardTokenExchangeV2Test for token-exchange V2

Once we add more implementations for "Standard token exchange", those tests might differ more and more. So question is, whether to rather make them independent by removing AbstractStandardTokenExchangeTest and copy the tests to both classes?

IMO it seems this might be better to have independent classes as:

  • Having subclass makes it harder to make sure "Token exchange V1" still behaves the same way as before any changes (As when there is some difference, some refactoring is usually needed, which affects V1 test as well like I did for example in the PR 35505 token exchange more audiences - requester client used for clientSession and scopes #37018 )

  • The initialization might be different/easier for V2 (For example, there is no need to initialize FGAP as we likely remove them for standard token-exchange V2. Also we can omit initialization of some clients, which are related to "impersonation" test scenarios etc)

  • Some tests might be omitted entirely for V2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions