TestClientClone verifies the Clone() method on client credentials.
(t *testing.T)
| 660 | |
| 661 | // TestClientClone verifies the Clone() method on client credentials. |
| 662 | func (s) TestClientClone(t *testing.T) { |
| 663 | opts := ClientOptions{FallbackCreds: makeFallbackClientCreds(t)} |
| 664 | orig, err := NewClientCredentials(opts) |
| 665 | if err != nil { |
| 666 | t.Fatalf("NewClientCredentials(%v) failed: %v", opts, err) |
| 667 | } |
| 668 | |
| 669 | // The credsImpl does not have any exported fields, and it does not make |
| 670 | // sense to use any cmp options to look deep into. So, all we make sure here |
| 671 | // is that the cloned object points to a different location in memory. |
| 672 | if clone := orig.Clone(); clone == orig { |
| 673 | t.Fatal("return value from Clone() doesn't point to new credentials instance") |
| 674 | } |
| 675 | } |
nothing calls this directly
no test coverage detected