Skip to content

Commit b069440

Browse files
authored
credentials/google: use grpctest.Tester for tests in this package (#5098)
1 parent fbaf7c5 commit b069440

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

credentials/google/google_test.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,18 @@ import (
2626
"google.golang.org/grpc/credentials"
2727
"google.golang.org/grpc/internal"
2828
icredentials "google.golang.org/grpc/internal/credentials"
29+
"google.golang.org/grpc/internal/grpctest"
2930
"google.golang.org/grpc/resolver"
3031
)
3132

33+
type s struct {
34+
grpctest.Tester
35+
}
36+
37+
func Test(t *testing.T) {
38+
grpctest.RunSubTests(t, s{})
39+
}
40+
3241
type testCreds struct {
3342
credentials.TransportCredentials
3443
typ string
@@ -73,7 +82,7 @@ func overrideNewCredsFuncs() func() {
7382
// TestClientHandshakeBasedOnClusterName that by default (without switching
7483
// modes), ClientHandshake does either tls or alts base on the cluster name in
7584
// attributes.
76-
func TestClientHandshakeBasedOnClusterName(t *testing.T) {
85+
func (s) TestClientHandshakeBasedOnClusterName(t *testing.T) {
7786
defer overrideNewCredsFuncs()()
7887
for bundleTyp, tc := range map[string]credentials.Bundle{
7988
"defaultCredsWithOptions": NewDefaultCredentialsWithOptions(DefaultCredentialsOptions{}),

0 commit comments

Comments
 (0)