aboutsummaryrefslogtreecommitdiffstats
path: root/test/security/k8s
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2019-09-26 14:50:16 +0200
committerPawel Wieczorek <p.wieczorek2@samsung.com>2019-09-26 19:02:01 +0200
commit664ce36e4606ba855bb997059f43d89bb51385e5 (patch)
treea34e3aeb054606d17b099be9843f793b9021d3b5 /test/security/k8s
parent48d0f8c98b3511875768085af12c21389a465ab4 (diff)
k8s: Change default cluster access method choice logic
Previous way of choosing it led to impractical calls, e.g. $ ./check -rke # (works fine) $ ./check -ranchercli # "Not supported." $ ./check -ranchercli -rke=false # (works fine) Disabling default cluster access method is no longer necessary. Issue-ID: SECCOM-235 Change-Id: I2b4d5bff10c5470e567351abeac0431bed3b7938 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'test/security/k8s')
-rw-r--r--test/security/k8s/src/check/cmd/check/check.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/security/k8s/src/check/cmd/check/check.go b/test/security/k8s/src/check/cmd/check/check.go
index 5a29fa9d5..80a17f0c5 100644
--- a/test/security/k8s/src/check/cmd/check/check.go
+++ b/test/security/k8s/src/check/cmd/check/check.go
@@ -11,7 +11,7 @@ import (
var (
ranchercli = flag.Bool("ranchercli", false, "use rancher utility for accessing cluster nodes")
- rke = flag.Bool("rke", true, "use RKE cluster definition and ssh for accessing cluster nodes (default)")
+ rke = flag.Bool("rke", false, "use RKE cluster definition and ssh for accessing cluster nodes (default)")
)
func main() {
@@ -20,6 +20,11 @@ func main() {
log.Fatal("Not supported.")
}
+ // Use default cluster access method if none was declared explicitly.
+ if !(*ranchercli || *rke) {
+ *rke = true
+ }
+
var (
k8sParams []string
err error