We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 916edd9 + 3698a25 commit fdd575fCopy full SHA for fdd575f
test/e2e/framework/util.go
@@ -557,6 +557,14 @@ func LoadConfig() (config *restclient.Config, err error) {
557
}
558
return nil, err
559
560
+ // In case Host is not set in TestContext, sets it as
561
+ // CurrentContext Server for k8s API client to connect to.
562
+ if TestContext.Host == "" && c.Clusters != nil {
563
+ currentContext, ok := c.Clusters[c.CurrentContext]
564
+ if ok {
565
+ TestContext.Host = currentContext.Server
566
+ }
567
568
569
return clientcmd.NewDefaultClientConfig(*c, &clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: TestContext.Host}}).ClientConfig()
570
0 commit comments