Skip to content

Commit 74e858f

Browse files
authored
test(storage): fix DoNotDetectDirectConnectivityWhenDisabled (#12098)
The client isn't used in the test; options must be passed in directly to the direct connectivity check.
1 parent 2f22244 commit 74e858f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

storage/integration_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -674,15 +674,15 @@ func TestIntegration_DetectDirectConnectivityInGCE(t *testing.T) {
674674
// "grpc.lb.locality" to return ""
675675
func TestIntegration_DoNotDetectDirectConnectivityWhenDisabled(t *testing.T) {
676676
ctx := skipHTTP("grpc only test")
677-
multiTransportTest(ctx, t, func(t *testing.T, ctx context.Context, bucket string, prefix string, client *Client) {
678-
err := CheckDirectConnectivitySupported(ctx, bucket)
677+
multiTransportTest(skipExtraReadAPIs(ctx, "no reads in test"), t, func(t *testing.T, ctx context.Context, bucket string, _ string, _ *Client) {
678+
err := CheckDirectConnectivitySupported(ctx, bucket, internaloption.EnableDirectPath(false))
679679
if err == nil {
680680
t.Fatal("CheckDirectConnectivitySupported: expected error but none returned")
681681
}
682682
if err != nil && !strings.Contains(err.Error(), "direct connectivity not detected") {
683683
t.Fatalf("CheckDirectConnectivitySupported: failed on a different error %v", err)
684684
}
685-
}, internaloption.EnableDirectPath(false))
685+
})
686686
}
687687

688688
// TestIntegration_MetricsEnablement does not use multiTransportTest because it

0 commit comments

Comments
 (0)