authinfoimpl: Fix TestIntegrationAuthInfoStore when running on Spanner. (#103383)
Fix TestIntegrationAuthInfoStore when running on Spanner.
This commit is contained in:
@@ -50,7 +50,10 @@ func TestIntegrationAuthInfoStore(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.Len(t, labels, 2)
|
||||
|
||||
require.Equal(t, login.AzureADAuthModule, labels[1])
|
||||
// There is no guarantee that user with user_id=1 gets "oauth_azuread" or "ldap".
|
||||
// Both are valid results for the query (basically SELECT * FROM `user_auth` WHERE `user_id` IN (1,2) ORDER BY created),
|
||||
// Spanner emulator will randomize its output, so test cannot rely on the ordering (other than "Created" column, which is equal here).
|
||||
require.True(t, labels[1] == login.AzureADAuthModule || labels[1] == login.LDAPAuthModule)
|
||||
require.Equal(t, login.GoogleAuthModule, labels[2])
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user