From b069440926d58e0a6fa6c59b01638a6948f9e6f3 Mon Sep 17 00:00:00 2001 From: Easwar Swaminathan Date: Tue, 4 Jan 2022 08:51:39 -0800 Subject: [PATCH] credentials/google: use grpctest.Tester for tests in this package (#5098) --- credentials/google/google_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/credentials/google/google_test.go b/credentials/google/google_test.go index 8c08712087d..0699b9ad4e0 100644 --- a/credentials/google/google_test.go +++ b/credentials/google/google_test.go @@ -26,9 +26,18 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal" icredentials "google.golang.org/grpc/internal/credentials" + "google.golang.org/grpc/internal/grpctest" "google.golang.org/grpc/resolver" ) +type s struct { + grpctest.Tester +} + +func Test(t *testing.T) { + grpctest.RunSubTests(t, s{}) +} + type testCreds struct { credentials.TransportCredentials typ string @@ -73,7 +82,7 @@ func overrideNewCredsFuncs() func() { // TestClientHandshakeBasedOnClusterName that by default (without switching // modes), ClientHandshake does either tls or alts base on the cluster name in // attributes. -func TestClientHandshakeBasedOnClusterName(t *testing.T) { +func (s) TestClientHandshakeBasedOnClusterName(t *testing.T) { defer overrideNewCredsFuncs()() for bundleTyp, tc := range map[string]credentials.Bundle{ "defaultCredsWithOptions": NewDefaultCredentialsWithOptions(DefaultCredentialsOptions{}),