MCPcopy Create free account
hub / github.com/containers/image / TestDirectClientConfig

Function TestDirectClientConfig

openshift/openshift-copies_test.go:64–82  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

62}
63
64func TestDirectClientConfig(t *testing.T) {
65 setupKubeConfigForSerialTest(t)
66
67 rules := newOpenShiftClientConfigLoadingRules()
68 config, err := rules.Load()
69 require.NoError(t, err)
70
71 direct := newNonInteractiveClientConfig(*config)
72 res, err := direct.ClientConfig()
73 require.NoError(t, err)
74 assert.Equal(t, &restConfig{
75 Host: "https://172.17.0.2:8443",
76 TLSClientConfig: restTLSClientConfig{
77 CertData: []byte("Client cert"),
78 KeyData: []byte("Client key"),
79 CAData: []byte("Cluster CA"),
80 },
81 }, res)
82}
83
84func TestDeferredLoadingClientConfig(t *testing.T) {
85 setupKubeConfigForSerialTest(t)

Callers

nothing calls this directly

Calls 5

LoadMethod · 0.80
ClientConfigMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…