@@ -35,6 +35,7 @@ func TestWithCredentials(t *testing.T) {
35
35
func TestDefaultApply (t * testing.T ) {
36
36
opts := []option.ClientOption {
37
37
WithDefaultEndpoint ("https://example.com:443" ),
38
+ WithDefaultEndpointTemplate ("https://foo.%s/" ),
38
39
WithDefaultMTLSEndpoint ("http://mtls.example.com:445" ),
39
40
WithDefaultScopes ("a" ),
40
41
WithDefaultUniverseDomain ("foo.com" ),
@@ -45,11 +46,12 @@ func TestDefaultApply(t *testing.T) {
45
46
opt .Apply (& got )
46
47
}
47
48
want := internal.DialSettings {
48
- DefaultScopes : []string {"a" },
49
- DefaultEndpoint : "https://example.com:443" ,
50
- DefaultUniverseDomain : "foo.com" ,
51
- DefaultAudience : "audience" ,
52
- DefaultMTLSEndpoint : "http://mtls.example.com:445" ,
49
+ DefaultScopes : []string {"a" },
50
+ DefaultEndpoint : "https://example.com:443" ,
51
+ DefaultEndpointTemplate : "https://foo.%s/" ,
52
+ DefaultUniverseDomain : "foo.com" ,
53
+ DefaultAudience : "audience" ,
54
+ DefaultMTLSEndpoint : "http://mtls.example.com:445" ,
53
55
}
54
56
if ! cmp .Equal (got , want , cmpopts .IgnoreUnexported (grpc.ClientConn {}), cmpopts .IgnoreFields (google.Credentials {}, "universeDomain" )) {
55
57
t .Errorf (cmp .Diff (got , want , cmpopts .IgnoreUnexported (grpc.ClientConn {}), cmpopts .IgnoreFields (google.Credentials {}, "universeDomain" )))
0 commit comments