mirror of https://github.com/k3s-io/k3s
E2E: Add Api Server option to kubectl
parent
196b3d066d
commit
0f0c0700ff
|
@ -54,7 +54,7 @@ var _ = Describe("kubectl", func() {
|
|||
|
||||
Describe("update-demo", func() {
|
||||
var (
|
||||
updateDemoRoot = filepath.Join(testContext.RepoRoot, "examples/update-demo/v1beta3")
|
||||
updateDemoRoot = filepath.Join(testContext.RepoRoot, "examples/update-demo")
|
||||
nautilusPath = filepath.Join(updateDemoRoot, "nautilus-rc.yaml")
|
||||
kittenPath = filepath.Join(updateDemoRoot, "kitten-rc.yaml")
|
||||
)
|
||||
|
|
|
@ -274,9 +274,16 @@ func kubectlCmd(args ...string) *exec.Cmd {
|
|||
defaultArgs := []string{}
|
||||
if testContext.KubeConfig != "" {
|
||||
defaultArgs = append(defaultArgs, "--"+clientcmd.RecommendedConfigPathFlag+"="+testContext.KubeConfig)
|
||||
|
||||
// Reference the KubeContext
|
||||
if testContext.KubeContext != "" {
|
||||
defaultArgs = append(defaultArgs, "--"+clientcmd.FlagContext+"="+testContext.KubeContext)
|
||||
}
|
||||
|
||||
// Reference a --server option so tests can run anywhere.
|
||||
if testContext.Host != "" {
|
||||
defaultArgs = append(defaultArgs, "--"+clientcmd.FlagAPIServer+"="+testContext.Host)
|
||||
}
|
||||
} else {
|
||||
defaultArgs = append(defaultArgs, "--"+clientcmd.FlagAuthPath+"="+testContext.AuthConfig)
|
||||
if testContext.CertDir != "" {
|
||||
|
|
Loading…
Reference in New Issue