Skip to content

Commit

Permalink
tests: remove direct cast to *TestServer
Browse files Browse the repository at this point in the history
We want to keep tests using go interfaces, to ensure the test server
APIs can be mocked if needed.

Incidentally, this patch improves the APIs as follows:

- the health probe for secondary tenant servers now properly
  includes the draining state of the RPC interface (previously,
  only the SQL draining state was included).

- `ApplicationLayerInterface` now includes `Readiness()` and
  `DefaultZoneConfig()`.

- `StorageLayerInterface` now includes
  `ScratchRangeWithExpirationLease()`, `GetRangeLease()`, `TsDB()`,
  `Locality()` and `DefaultSystemZoneConfig()`.

Release note: None
  • Loading branch information
knz committed Jul 31, 2023
1 parent c0ab6eb commit 0414edb
Show file tree
Hide file tree
Showing 99 changed files with 723 additions and 686 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@
/pkg/roachpb/.gitattributes @cockroachdb/dev-inf
#!/pkg/roachpb/BUILD.bazel @cockroachdb/kv-prs-noreview
/pkg/roachpb/data* @cockroachdb/kv-prs
/pkg/roachpb/leaseinfo* @cockroachdb/kv-prs
/pkg/roachpb/index* @cockroachdb/cluster-observability
/pkg/roachpb/internal* @cockroachdb/kv-prs
/pkg/roachpb/io-formats* @cockroachdb/disaster-recovery
Expand Down
1 change: 0 additions & 1 deletion pkg/bench/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ go_library(
"//pkg/ccl",
"//pkg/multitenant/tenantcapabilities",
"//pkg/roachpb",
"//pkg/server",
"//pkg/testutils",
"//pkg/testutils/serverutils",
"//pkg/testutils/skip",
Expand Down
3 changes: 1 addition & 2 deletions pkg/bench/foreachdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
_ "github.com/cockroachdb/cockroach/pkg/ccl"
"github.com/cockroachdb/cockroach/pkg/multitenant/tenantcapabilities"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/server"
"github.com/cockroachdb/cockroach/pkg/testutils"
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
Expand Down Expand Up @@ -71,7 +70,7 @@ func benchmarkSharedProcessTenantCockroach(b *testing.B, f BenchmarkFn) {

// Create our own test tenant with a known name.
tenantName := "benchtenant"
_, tenantDB, err := s.(*server.TestServer).StartSharedProcessTenant(ctx,
_, tenantDB, err := s.TenantController().StartSharedProcessTenant(ctx,
base.TestSharedProcessTenantArgs{
TenantName: roachpb.TenantName(tenantName),
UseDatabase: "bench",
Expand Down
3 changes: 1 addition & 2 deletions pkg/ccl/backupccl/backup_tenant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/jobs"
"github.com/cockroachdb/cockroach/pkg/jobs/jobspb"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/server"
"github.com/cockroachdb/cockroach/pkg/sql"
_ "github.com/cockroachdb/cockroach/pkg/sql/importer"
"github.com/cockroachdb/cockroach/pkg/testutils"
Expand Down Expand Up @@ -87,7 +86,7 @@ func TestBackupTenantImportingTable(t *testing.T) {
t.Fatal(err)
}

if err := tc.Server(0).(*server.TestServer).WaitForTenantReadiness(ctx, tenantID); err != nil {
if err := tc.Server(0).TenantController().WaitForTenantReadiness(ctx, tenantID); err != nil {
t.Fatal(err)
}

Expand Down
15 changes: 7 additions & 8 deletions pkg/ccl/backupccl/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/security"
"github.com/cockroachdb/cockroach/pkg/security/username"
"github.com/cockroachdb/cockroach/pkg/server"
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
"github.com/cockroachdb/cockroach/pkg/spanconfig"
"github.com/cockroachdb/cockroach/pkg/sql"
Expand Down Expand Up @@ -7150,7 +7149,7 @@ func TestBackupRestoreTenant(t *testing.T) {
)

tenantID := roachpb.MustMakeTenantID(10)
if err := restoreTC.Server(0).(*server.TestServer).WaitForTenantReadiness(ctx, tenantID); err != nil {
if err := restoreTC.Server(0).TenantController().WaitForTenantReadiness(ctx, tenantID); err != nil {
t.Fatal(err)
}

Expand Down Expand Up @@ -7242,7 +7241,7 @@ func TestBackupRestoreTenant(t *testing.T) {
)

tenantID := roachpb.MustMakeTenantID(10)
if err := restoreTC.Server(0).(*server.TestServer).WaitForTenantReadiness(ctx, tenantID); err != nil {
if err := restoreTC.Server(0).TenantController().WaitForTenantReadiness(ctx, tenantID); err != nil {
t.Fatal(err)
}

Expand Down Expand Up @@ -7316,7 +7315,7 @@ func TestBackupRestoreTenant(t *testing.T) {
)

tenantID := roachpb.MustMakeTenantID(10)
if err := restoreTC.Server(0).(*server.TestServer).WaitForTenantReadiness(ctx, tenantID); err != nil {
if err := restoreTC.Server(0).TenantController().WaitForTenantReadiness(ctx, tenantID); err != nil {
t.Fatal(err)
}

Expand All @@ -7334,7 +7333,7 @@ func TestBackupRestoreTenant(t *testing.T) {
restoreTenant10.CheckQueryResults(t, `SHOW CLUSTER SETTING tenant_cost_model.write_payload_cost_per_mebibyte`, [][]string{{"456"}})

tenantID = roachpb.MustMakeTenantID(11)
if err := restoreTC.Server(0).(*server.TestServer).WaitForTenantReadiness(ctx, tenantID); err != nil {
if err := restoreTC.Server(0).TenantController().WaitForTenantReadiness(ctx, tenantID); err != nil {
t.Fatal(err)
}

Expand All @@ -7355,7 +7354,7 @@ func TestBackupRestoreTenant(t *testing.T) {
restoreDB.Exec(t, `RESTORE TENANT 11 FROM 'nodelocal://1/clusterwide' WITH virtual_cluster = '20', virtual_cluster_name = 'tenant-20'`)

tenantID = roachpb.MustMakeTenantID(20)
if err := restoreTC.Server(0).(*server.TestServer).WaitForTenantReadiness(ctx, tenantID); err != nil {
if err := restoreTC.Server(0).TenantController().WaitForTenantReadiness(ctx, tenantID); err != nil {
t.Fatal(err)
}

Expand Down Expand Up @@ -7392,7 +7391,7 @@ func TestBackupRestoreTenant(t *testing.T) {
restoreDB.Exec(t, `RESTORE TENANT 10 FROM 'nodelocal://1/t10' AS OF SYSTEM TIME `+ts1)

tenantID := roachpb.MustMakeTenantID(10)
if err := restoreTC.Server(0).(*server.TestServer).WaitForTenantReadiness(ctx, tenantID); err != nil {
if err := restoreTC.Server(0).TenantController().WaitForTenantReadiness(ctx, tenantID); err != nil {
t.Fatal(err)
}

Expand All @@ -7418,7 +7417,7 @@ func TestBackupRestoreTenant(t *testing.T) {
restoreDB.Exec(t, `RESTORE TENANT 20 FROM 'nodelocal://1/t20'`)

tenantID := roachpb.MustMakeTenantID(20)
if err := restoreTC.Server(0).(*server.TestServer).WaitForTenantReadiness(ctx, tenantID); err != nil {
if err := restoreTC.Server(0).TenantController().WaitForTenantReadiness(ctx, tenantID); err != nil {
t.Fatal(err)
}

Expand Down
7 changes: 3 additions & 4 deletions pkg/ccl/changefeedccl/alter_changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/keys"
"github.com/cockroachdb/cockroach/pkg/kv"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/server"
"github.com/cockroachdb/cockroach/pkg/server/telemetry"
"github.com/cockroachdb/cockroach/pkg/sql/catalog/catpb"
"github.com/cockroachdb/cockroach/pkg/sql/catalog/desctestutils"
Expand All @@ -50,7 +49,9 @@ func TestAlterChangefeedAddTargetPrivileges(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

srv, db, _ := serverutils.StartServer(t, base.TestServerArgs{
ctx := context.Background()

s, db, _ := serverutils.StartServer(t, base.TestServerArgs{
DefaultTestTenant: base.TODOTestTenantDisabled,
Knobs: base.TestingKnobs{
JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(),
Expand All @@ -66,8 +67,6 @@ func TestAlterChangefeedAddTargetPrivileges(t *testing.T) {
},
},
})
ctx := context.Background()
s := srv.(*server.TestServer)
defer s.Stopper().Stop(ctx)

rootDB := sqlutils.MakeSQLRunner(db)
Expand Down
7 changes: 3 additions & 4 deletions pkg/ccl/changefeedccl/changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,7 @@ func TestChangefeedLaggingSpanCheckpointing(t *testing.T) {
defer stopServer()
sqlDB := sqlutils.MakeSQLRunner(db)

knobs := s.(*server.TestServer).Cfg.TestingKnobs.
knobs := s.TestingKnobs().
DistSQL.(*execinfra.TestingKnobs).
Changefeed.(*TestingKnobs)

Expand Down Expand Up @@ -2695,7 +2695,8 @@ func TestChangefeedCreateAuthorizationWithChangefeedPriv(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

srv, db, _ := serverutils.StartServer(t, base.TestServerArgs{
ctx := context.Background()
s, db, _ := serverutils.StartServer(t, base.TestServerArgs{
DefaultTestTenant: base.TODOTestTenantDisabled,
Knobs: base.TestingKnobs{
JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(),
Expand All @@ -2711,8 +2712,6 @@ func TestChangefeedCreateAuthorizationWithChangefeedPriv(t *testing.T) {
},
},
})
ctx := context.Background()
s := srv.(*server.TestServer)
defer s.Stopper().Stop(ctx)

rootDB := sqlutils.MakeSQLRunner(db)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/changefeedccl/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ func makeSystemServerWithOptions(
TestServer: TestServer{
DB: systemDB,
Server: systemServer,
TestingKnobs: systemServer.(*server.TestServer).Cfg.TestingKnobs,
TestingKnobs: *systemServer.SystemLayer().TestingKnobs(),
Codec: keys.SystemSQLCodec,
},
SystemServer: systemServer,
Expand Down
6 changes: 2 additions & 4 deletions pkg/ccl/changefeedccl/scheduled_changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/scheduledjobs"
"github.com/cockroachdb/cockroach/pkg/scheduledjobs/schedulebase"
"github.com/cockroachdb/cockroach/pkg/security/username"
"github.com/cockroachdb/cockroach/pkg/server"
"github.com/cockroachdb/cockroach/pkg/sql"
"github.com/cockroachdb/cockroach/pkg/sql/execinfra"
"github.com/cockroachdb/cockroach/pkg/sql/parser"
Expand Down Expand Up @@ -290,7 +289,8 @@ func TestCreateChangefeedScheduleChecksPermissionsDuringDryRun(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

srv, db, _ := serverutils.StartServer(t, base.TestServerArgs{
ctx := context.Background()
s, db, _ := serverutils.StartServer(t, base.TestServerArgs{
DefaultTestTenant: base.TODOTestTenantDisabled,
Knobs: base.TestingKnobs{
JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(),
Expand All @@ -306,8 +306,6 @@ func TestCreateChangefeedScheduleChecksPermissionsDuringDryRun(t *testing.T) {
},
},
})
ctx := context.Background()
s := srv.(*server.TestServer)
defer s.Stopper().Stop(ctx)
rootDB := sqlutils.MakeSQLRunner(db)
rootDB.Exec(t, `SET CLUSTER SETTING kv.rangefeed.enabled = true`)
Expand Down
6 changes: 3 additions & 3 deletions pkg/ccl/kvccl/kvfollowerreadsccl/followerreads_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ func TestFollowerReadsWithStaleDescriptor(t *testing.T) {
// Make a note of the follower reads metric on n3. We'll check that it was
// incremented.
var followerReadsCountBefore int64
err := tc.Servers[2].Stores().VisitStores(func(s *kvserver.Store) error {
err := tc.Servers[2].GetStores().(*kvserver.Stores).VisitStores(func(s *kvserver.Store) error {
followerReadsCountBefore = s.Metrics().FollowerReadsCount.Count()
return nil
})
Expand All @@ -820,7 +820,7 @@ func TestFollowerReadsWithStaleDescriptor(t *testing.T) {

// Check that the follower read metric was incremented.
var followerReadsCountAfter int64
err = tc.Servers[2].Stores().VisitStores(func(s *kvserver.Store) error {
err = tc.Servers[2].GetStores().(*kvserver.Stores).VisitStores(func(s *kvserver.Store) error {
followerReadsCountAfter = s.Metrics().FollowerReadsCount.Count()
return nil
})
Expand Down Expand Up @@ -1025,7 +1025,7 @@ func TestSecondaryTenantFollowerReadsRouting(t *testing.T) {
getFollowerReadCounts := func() [numNodes]int64 {
var counts [numNodes]int64
for i := range tc.Servers {
err := tc.Servers[i].Stores().VisitStores(func(s *kvserver.Store) error {
err := tc.Servers[i].GetStores().(*kvserver.Stores).VisitStores(func(s *kvserver.Store) error {
counts[i] = s.Metrics().FollowerReadsCount.Count()
return nil
})
Expand Down
11 changes: 5 additions & 6 deletions pkg/ccl/partitionccl/zone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/base"
"github.com/cockroachdb/cockroach/pkg/config/zonepb"
"github.com/cockroachdb/cockroach/pkg/keys"
"github.com/cockroachdb/cockroach/pkg/server"
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
"github.com/cockroachdb/cockroach/pkg/sql"
"github.com/cockroachdb/cockroach/pkg/sql/catalog"
Expand Down Expand Up @@ -55,9 +54,9 @@ func TestValidIndexPartitionSetShowZones(t *testing.T) {
PARTITION p1 VALUES IN (DEFAULT)
)`)

yamlDefault := fmt.Sprintf("gc: {ttlseconds: %d}", s.(*server.TestServer).Cfg.DefaultZoneConfig.GC.TTLSeconds)
yamlDefault := fmt.Sprintf("gc: {ttlseconds: %d}", s.DefaultZoneConfig().GC.TTLSeconds)
yamlOverride := "gc: {ttlseconds: 42}"
zoneOverride := s.(*server.TestServer).Cfg.DefaultZoneConfig
zoneOverride := s.DefaultZoneConfig()
zoneOverride.GC = &zonepb.GCPolicy{TTLSeconds: 42}
partialZoneOverride := *zonepb.NewZoneConfig()
partialZoneOverride.GC = &zonepb.GCPolicy{TTLSeconds: 42}
Expand All @@ -67,7 +66,7 @@ func TestValidIndexPartitionSetShowZones(t *testing.T) {

defaultRow := sqlutils.ZoneRow{
ID: keys.RootNamespaceID,
Config: s.(*server.TestServer).Cfg.DefaultZoneConfig,
Config: s.DefaultZoneConfig(),
}
defaultOverrideRow := sqlutils.ZoneRow{
ID: keys.RootNamespaceID,
Expand Down Expand Up @@ -403,11 +402,11 @@ CREATE TABLE t.test (k INT PRIMARY KEY, v INT);`); err != nil {

defaultRow := sqlutils.ZoneRow{
ID: keys.RootNamespaceID,
Config: s.(*server.TestServer).Cfg.DefaultZoneConfig,
Config: s.DefaultZoneConfig(),
}

tableID := sqlutils.QueryTableID(t, sqlDB, "t", "public", "test")
zoneOverride := s.(*server.TestServer).Cfg.DefaultZoneConfig
zoneOverride := s.DefaultZoneConfig()
zoneOverride.GC = &zonepb.GCPolicy{TTLSeconds: 42}

overrideRow := sqlutils.ZoneRow{
Expand Down
3 changes: 1 addition & 2 deletions pkg/ccl/serverccl/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"testing"

"github.com/cockroachdb/cockroach/pkg/base"
"github.com/cockroachdb/cockroach/pkg/server"
"github.com/cockroachdb/cockroach/pkg/server/serverpb"
"github.com/cockroachdb/cockroach/pkg/testutils"
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
Expand Down Expand Up @@ -177,7 +176,7 @@ func TestListTenants(t *testing.T) {
})
defer s.Stopper().Stop(ctx)

_, _, err := s.(*server.TestServer).StartSharedProcessTenant(ctx,
_, _, err := s.TenantController().StartSharedProcessTenant(ctx,
base.TestSharedProcessTenantArgs{
TenantName: "test",
})
Expand Down
4 changes: 2 additions & 2 deletions pkg/ccl/serverccl/server_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func TestServerControllerHTTP(t *testing.T) {
t.Logf("waking up a test tenant")

// Create our own test tenant with a known name.
_, _, err = s.(*server.TestServer).StartSharedProcessTenant(ctx,
_, _, err = s.TenantController().StartSharedProcessTenant(ctx,
base.TestSharedProcessTenantArgs{
TenantName: "hello",
})
Expand Down Expand Up @@ -643,7 +643,7 @@ func TestServiceShutdownUsesGracefulDrain(t *testing.T) {
drainCh := make(chan struct{})

// Start a shared process server.
_, _, err := s.(*server.TestServer).StartSharedProcessTenant(ctx,
_, _, err := s.TenantController().StartSharedProcessTenant(ctx,
base.TestSharedProcessTenantArgs{
TenantName: "hello",
Knobs: base.TestingKnobs{
Expand Down
3 changes: 1 addition & 2 deletions pkg/ccl/serverccl/tenant_vars_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/base"
_ "github.com/cockroachdb/cockroach/pkg/ccl/kvccl"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/server"
"github.com/cockroachdb/cockroach/pkg/testutils"
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
Expand Down Expand Up @@ -48,7 +47,7 @@ func TestTenantVars(t *testing.T) {
})
} else {
var err error
tenant, _, err = srv.(*server.TestServer).StartSharedProcessTenant(ctx,
tenant, _, err = srv.TenantController().StartSharedProcessTenant(ctx,
base.TestSharedProcessTenantArgs{
TenantName: roachpb.TenantName("test"),
TenantID: roachpb.MustMakeTenantID(20),
Expand Down
14 changes: 7 additions & 7 deletions pkg/ccl/sqlproxyccl/proxy_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func TestProxyProtocol(t *testing.T) {

sql, db, _ := serverutils.StartServer(t, base.TestServerArgs{})

ts := sql.(*server.TestServer).ApplicationLayer()
ts := sql.ApplicationLayer()
ts.PGPreServer().(*pgwire.PreServeConnHandler).TestingSetTrustClientProvidedRemoteAddr(true)
pgs := ts.PGServer().(*pgwire.Server)
pgs.TestingEnableAuthLogging()
Expand Down Expand Up @@ -249,7 +249,7 @@ func TestPrivateEndpointsACL(t *testing.T) {
sql, db, _ := serverutils.StartServer(t, base.TestServerArgs{})
defer sql.Stopper().Stop(ctx)

ts := sql.(*server.TestServer).ApplicationLayer()
ts := sql.ApplicationLayer()
ts.PGPreServer().(*pgwire.PreServeConnHandler).TestingSetTrustClientProvidedRemoteAddr(true)

// Create a default user.
Expand Down Expand Up @@ -691,7 +691,7 @@ func TestProxyAgainstSecureCRDB(t *testing.T) {
sql, db, _ := serverutils.StartServer(t, base.TestServerArgs{})
defer sql.Stopper().Stop(ctx)

ts := sql.(*server.TestServer).ApplicationLayer()
ts := sql.ApplicationLayer()
ts.PGPreServer().(*pgwire.PreServeConnHandler).TestingSetTrustClientProvidedRemoteAddr(true)
pgs := ts.PGServer().(*pgwire.Server)
pgs.TestingEnableAuthLogging()
Expand Down Expand Up @@ -888,7 +888,7 @@ func TestProxyTLSClose(t *testing.T) {
sql, db, _ := serverutils.StartServer(t, base.TestServerArgs{})
defer sql.Stopper().Stop(ctx)

ts := sql.(*server.TestServer).ApplicationLayer()
ts := sql.ApplicationLayer()
ts.PGPreServer().(*pgwire.PreServeConnHandler).TestingSetTrustClientProvidedRemoteAddr(true)
pgs := ts.PGServer().(*pgwire.Server)
pgs.TestingEnableAuthLogging()
Expand Down Expand Up @@ -939,7 +939,7 @@ func TestProxyModifyRequestParams(t *testing.T) {
sql, sqlDB, _ := serverutils.StartServer(t, base.TestServerArgs{})
defer sql.Stopper().Stop(ctx)

ts := sql.(*server.TestServer).ApplicationLayer()
ts := sql.ApplicationLayer()
ts.PGPreServer().(*pgwire.PreServeConnHandler).TestingSetTrustClientProvidedRemoteAddr(true)
pgs := ts.PGServer().(*pgwire.Server)
pgs.TestingEnableAuthLogging()
Expand Down Expand Up @@ -997,7 +997,7 @@ func TestInsecureProxy(t *testing.T) {
sql, db, _ := serverutils.StartServer(t, base.TestServerArgs{})
defer sql.Stopper().Stop(ctx)

ts := sql.(*server.TestServer).ApplicationLayer()
ts := sql.ApplicationLayer()
ts.PGPreServer().(*pgwire.PreServeConnHandler).TestingSetTrustClientProvidedRemoteAddr(true)
pgs := ts.PGServer().(*pgwire.Server)
pgs.TestingEnableAuthLogging()
Expand Down Expand Up @@ -1172,7 +1172,7 @@ func TestDenylistUpdate(t *testing.T) {
sql, sqlDB, _ := serverutils.StartServer(t, base.TestServerArgs{})
defer sql.Stopper().Stop(ctx)

ts := sql.(*server.TestServer).ApplicationLayer()
ts := sql.ApplicationLayer()
ts.
PGPreServer().(*pgwire.PreServeConnHandler).
TestingSetTrustClientProvidedRemoteAddr(true)
Expand Down
Loading

0 comments on commit 0414edb

Please sign in to comment.