diff --git a/test/e2e/vcctl.go b/test/e2e/vcctl.go index 2759025b0a..e141229aba 100644 --- a/test/e2e/vcctl.go +++ b/test/e2e/vcctl.go @@ -80,7 +80,7 @@ Use "vcctl job [command] --help" for more information about a command. }) It("Command: vcctl job list --help", func() { - home := os.Getenv("HOME") + kubeConfig := os.Getenv("KUBECONFIG") var output = ` list job information @@ -90,7 +90,7 @@ Usage: Flags: --all-namespaces list jobs in all namespaces -h, --help help for list - -k, --kubeconfig string (optional) absolute path to the kubeconfig file (default "` + home + `/.kube/config") + -k, --kubeconfig string (optional) absolute path to the kubeconfig file (default "` + kubeConfig + `") -s, --master string the address of apiserver -n, --namespace string the namespace of job (default "default") -S, --scheduler string list job with specified scheduler name @@ -107,7 +107,7 @@ Global Flags: }) It("Command: vkctl job suspend -n {$JobName} --help", func() { - home := os.Getenv("HOME") + kubeConfig := os.Getenv("KUBECONFIG") var output = ` abort a job @@ -116,7 +116,7 @@ Usage: Flags: -h, --help help for suspend - -k, --kubeconfig string (optional) absolute path to the kubeconfig file (default "` + home + `/.kube/config") + -k, --kubeconfig string (optional) absolute path to the kubeconfig file (default "` + kubeConfig + `") -s, --master string the address of apiserver -N, --name string the name of job -n, --namespace string the namespace of job (default "default") @@ -132,7 +132,7 @@ Global Flags: }) It("vkctl job resume -n {$JobName} --help", func() { - home := os.Getenv("HOME") + kubeConfig := os.Getenv("KUBECONFIG") var output = ` resume a job @@ -141,7 +141,7 @@ Usage: Flags: -h, --help help for resume - -k, --kubeconfig string (optional) absolute path to the kubeconfig file (default "` + home + `/.kube/config") + -k, --kubeconfig string (optional) absolute path to the kubeconfig file (default "` + kubeConfig + `") -s, --master string the address of apiserver -N, --name string the name of job -n, --namespace string the namespace of job (default "default") @@ -157,7 +157,7 @@ Global Flags: }) It("vkctl job run --help", func() { - home := os.Getenv("HOME") + kubeConfig := os.Getenv("KUBECONFIG") var output = ` run job by parameters from the command line @@ -168,7 +168,7 @@ Flags: -f, --filename string the yaml file of job -h, --help help for run -i, --image string the container image of job (default "busybox") - -k, --kubeconfig string (optional) absolute path to the kubeconfig file (default "` + home + `/.kube/config") + -k, --kubeconfig string (optional) absolute path to the kubeconfig file (default "` + kubeConfig + `") -L, --limits string the resource limit of the task (default "cpu=1000m,memory=100Mi") -s, --master string the address of apiserver -m, --min int the minimal available tasks of job (default 1)