(t *testing.T)
| 193 | } |
| 194 | |
| 195 | func TestValidateEmptyContextName(t *testing.T) { |
| 196 | config := clientcmdapi.NewConfig() |
| 197 | config.CurrentContext = "anything" |
| 198 | config.Contexts[""] = &clientcmdapi.Context{Cluster: "missing", AuthInfo: "missing"} |
| 199 | test := configValidationTest{ |
| 200 | config: config, |
| 201 | expectedErrorSubstring: []string{"empty context name", "is not allowed"}, |
| 202 | } |
| 203 | |
| 204 | test.testContext("", t) |
| 205 | test.testConfig(t) |
| 206 | } |
| 207 | |
| 208 | func TestValidateEmptyClusterInfo(t *testing.T) { |
| 209 | config := clientcmdapi.NewConfig() |
nothing calls this directly
no test coverage detected