MCPcopy
hub / github.com/kubernetes/client-go / TestIsContextNotFound

Function TestIsContextNotFound

tools/clientcmd/validation_test.go:129–140  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

127}
128
129func TestIsContextNotFound(t *testing.T) {
130 config := clientcmdapi.NewConfig()
131 config.CurrentContext = "anything"
132
133 err := Validate(*config)
134 if !IsContextNotFound(err) {
135 t.Errorf("Expected context not found, but got %v", err)
136 }
137 if !IsConfigurationInvalid(err) {
138 t.Errorf("Expected configuration invalid, but got %v", err)
139 }
140}
141
142func TestIsEmptyConfig(t *testing.T) {
143 config := clientcmdapi.NewConfig()

Callers

nothing calls this directly

Calls 4

ValidateFunction · 0.85
IsContextNotFoundFunction · 0.85
IsConfigurationInvalidFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected