Skip to content

Commit

Permalink
serverccl: fix TestVerifyPassword for test tenant
Browse files Browse the repository at this point in the history
We simply needed to use the ExecutorConfig of the test tenant if it was
started.

Release note: None
  • Loading branch information
yuzefovich committed Jul 18, 2023
1 parent e0b83fd commit dc6b2dc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/ccl/serverccl/role_authentication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,7 @@ func TestVerifyPassword(t *testing.T) {
defer log.Scope(t).Close(t)

ctx := context.Background()
s, db, _ := serverutils.StartServer(t,
base.TestServerArgs{
// One of the sub-tests fails.
DefaultTestTenant: base.TestDoesNotWorkWithSecondaryTenantsButWeDontKnowWhyYet(106903),
},
)
s, db, _ := serverutils.StartServer(t, base.TestServerArgs{})
defer s.Stopper().Stop(ctx)

ts := s.TenantOrServer()
Expand Down Expand Up @@ -145,7 +140,7 @@ func TestVerifyPassword(t *testing.T) {
{"user with VALID UNTIL NULL should succeed", "cthon98", "12345", false, false, true, true},
} {
t.Run(tc.testName, func(t *testing.T) {
execCfg := s.ExecutorConfig().(sql.ExecutorConfig)
execCfg := ts.ExecutorConfig().(sql.ExecutorConfig)
username := username.MakeSQLUsernameFromPreNormalizedString(tc.username)
exists, canLoginSQL, canLoginDBConsole, canUseReplicationMode, isSuperuser, _, pwRetrieveFn, err := sql.GetUserSessionInitInfo(
context.Background(), &execCfg, username, "", /* databaseName */
Expand Down

0 comments on commit dc6b2dc

Please sign in to comment.