()
| 81 | ) |
| 82 | |
| 83 | func overrideNewCredsFuncs() func() { |
| 84 | origNewTLS := newTLS |
| 85 | newTLS = func() credentials.TransportCredentials { |
| 86 | return testTLS |
| 87 | } |
| 88 | origNewALTS := newALTS |
| 89 | newALTS = func() credentials.TransportCredentials { |
| 90 | return testALTS |
| 91 | } |
| 92 | origNewADC := newADC |
| 93 | newADC = func(context.Context) (credentials.PerRPCCredentials, error) { |
| 94 | // We do not use perRPC creds in this test. It is safe to return nil here. |
| 95 | return nil, nil |
| 96 | } |
| 97 | |
| 98 | return func() { |
| 99 | newTLS = origNewTLS |
| 100 | newALTS = origNewALTS |
| 101 | newADC = origNewADC |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | // TestClientHandshakeBasedOnClusterName that by default (without switching |
| 106 | // modes), ClientHandshake does either tls or alts base on the cluster name in |
no outgoing calls
no test coverage detected