mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Use Logf instead of Printf in e2e
This commit is contained in:
parent
21dbeb5302
commit
dd25a6bda9
@ -878,13 +878,13 @@ func serviceResponding(c *client.Client, ns, name string) error {
|
|||||||
func loadConfig() (*client.Config, error) {
|
func loadConfig() (*client.Config, error) {
|
||||||
switch {
|
switch {
|
||||||
case testContext.KubeConfig != "":
|
case testContext.KubeConfig != "":
|
||||||
fmt.Printf(">>> testContext.KubeConfig: %s\n", testContext.KubeConfig)
|
Logf(">>> testContext.KubeConfig: %s\n", testContext.KubeConfig)
|
||||||
c, err := clientcmd.LoadFromFile(testContext.KubeConfig)
|
c, err := clientcmd.LoadFromFile(testContext.KubeConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error loading KubeConfig: %v", err.Error())
|
return nil, fmt.Errorf("error loading KubeConfig: %v", err.Error())
|
||||||
}
|
}
|
||||||
if testContext.KubeContext != "" {
|
if testContext.KubeContext != "" {
|
||||||
fmt.Printf(">>> testContext.KubeContext: %s\n", testContext.KubeContext)
|
Logf(">>> testContext.KubeContext: %s\n", testContext.KubeContext)
|
||||||
c.CurrentContext = testContext.KubeContext
|
c.CurrentContext = testContext.KubeContext
|
||||||
}
|
}
|
||||||
return clientcmd.NewDefaultClientConfig(*c, &clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: testContext.Host}}).ClientConfig()
|
return clientcmd.NewDefaultClientConfig(*c, &clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: testContext.Host}}).ClientConfig()
|
||||||
|
Loading…
Reference in New Issue
Block a user