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

Function TestCreateClean

tools/clientcmd/client_config_test.go:377–390  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

375}
376
377func TestCreateClean(t *testing.T) {
378 config := createValidTestConfig()
379 clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil)
380
381 clientConfig, err := clientBuilder.ClientConfig()
382 if err != nil {
383 t.Errorf("Unexpected error: %v", err)
384 }
385
386 matchStringArg(config.Clusters["clean"].Server, clientConfig.Host, t)
387 matchStringArg("", clientConfig.APIPath, t)
388 matchBoolArg(config.Clusters["clean"].InsecureSkipTLSVerify, clientConfig.Insecure, t)
389 matchStringArg(config.AuthInfos["clean"].Token, clientConfig.BearerToken, t)
390}
391
392func TestCreateCleanWithPrefix(t *testing.T) {
393 tt := []struct {

Callers

nothing calls this directly

Calls 6

createValidTestConfigFunction · 0.85
matchStringArgFunction · 0.85
matchBoolArgFunction · 0.85
ClientConfigMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected