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

Function TestValidateEmptyClusterInfo

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

Source from the content-addressed store, hash-verified

206}
207
208func TestValidateEmptyClusterInfo(t *testing.T) {
209 config := clientcmdapi.NewConfig()
210 config.Clusters["empty"] = clientcmdapi.NewCluster()
211 test := configValidationTest{
212 config: config,
213 expectedErrorSubstring: []string{"cluster has no server defined"},
214 }
215
216 test.testCluster("empty", t)
217 test.testConfig(t)
218}
219
220func TestValidateClusterInfoErrEmptyCluster(t *testing.T) {
221 cluster := clientcmdapi.NewCluster()

Callers

nothing calls this directly

Calls 2

testClusterMethod · 0.95
testConfigMethod · 0.95

Tested by

no test coverage detected