(t *testing.T)
| 180 | } |
| 181 | |
| 182 | func TestValidateEmptyContext(t *testing.T) { |
| 183 | config := clientcmdapi.NewConfig() |
| 184 | config.CurrentContext = "anything" |
| 185 | config.Contexts["anything"] = &clientcmdapi.Context{} |
| 186 | test := configValidationTest{ |
| 187 | config: config, |
| 188 | expectedErrorSubstring: []string{"user was not specified for context \"anything\"", "cluster was not specified for context \"anything\""}, |
| 189 | } |
| 190 | |
| 191 | test.testContext("anything", t) |
| 192 | test.testConfig(t) |
| 193 | } |
| 194 | |
| 195 | func TestValidateEmptyContextName(t *testing.T) { |
| 196 | config := clientcmdapi.NewConfig() |
nothing calls this directly
no test coverage detected