Skip to content

Commit

Permalink
multitenant: add TestTenants() helper to TestServer
Browse files Browse the repository at this point in the history
This patch adds a helper method for accessing information about the tenant(s)
that were probabilistically created with the TestServer.

Release note: None
  • Loading branch information
msbutler committed Sep 22, 2022
1 parent 7278468 commit 29934cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/server/testserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,11 @@ func (ts *TestServer) TenantStatusServer() interface{} {
return ts.status
}

// TestTenants provides information to tenant(s) that _may_ have been created
func (ts *TestServer) TestTenants() []serverutils.TestTenantInterface {
return ts.testTenants
}

// maybeStartDefaultTestTenant might start a test tenant. This can then be used
// for multi-tenant testing, where the default SQL connection will be made to
// this tenant instead of to the system tenant. Note that we will
Expand Down

0 comments on commit 29934cd

Please sign in to comment.