Skip to content

Commit

Permalink
credentials/google: use grpctest.Tester for tests in this package (#5098
Browse files Browse the repository at this point in the history
)
  • Loading branch information
easwars authored Jan 4, 2022
1 parent fbaf7c5 commit b069440
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion credentials/google/google_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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{}),
Expand Down

0 comments on commit b069440

Please sign in to comment.