(t *testing.T)
| 119 | } |
| 120 | |
| 121 | func (s) TestCloneServer(t *testing.T) { |
| 122 | wantServerName := "server.name" |
| 123 | c := NewServerCreds(DefaultServerOptions()) |
| 124 | c.OverrideServerName(wantServerName) |
| 125 | cc := c.Clone() |
| 126 | if got, want := cc.Info().ServerName, wantServerName; got != want { |
| 127 | t.Fatalf("cc.Info().ServerName = %v, want %v", got, want) |
| 128 | } |
| 129 | cc.OverrideServerName("") |
| 130 | if got, want := c.Info().ServerName, wantServerName; got != want { |
| 131 | t.Fatalf("Change in clone should not affect the original, c.Info().ServerName = %v, want %v", got, want) |
| 132 | } |
| 133 | if got, want := cc.Info().ServerName, ""; got != want { |
| 134 | t.Fatalf("cc.Info().ServerName = %v, want %v", got, want) |
| 135 | } |
| 136 | |
| 137 | ct := c.(*altsTC) |
| 138 | cct := cc.(*altsTC) |
| 139 | |
| 140 | if ct.side != cct.side { |
| 141 | t.Errorf("cc.side = %q, want %q", cct.side, ct.side) |
| 142 | } |
| 143 | if ct.hsAddress != cct.hsAddress { |
| 144 | t.Errorf("cc.hsAddress = %q, want %q", cct.hsAddress, ct.hsAddress) |
| 145 | } |
| 146 | if !reflect.DeepEqual(ct.accounts, cct.accounts) { |
| 147 | t.Errorf("cc.accounts = %q, want %q", cct.accounts, ct.accounts) |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | func (s) TestInfo(t *testing.T) { |
| 152 | // This is not testing any handshaker functionality, so it's fine to only |
nothing calls this directly
no test coverage detected