diff options
Diffstat (limited to 'test/security/k8s/src/check/cmd/check/check.go')
-rw-r--r-- | test/security/k8s/src/check/cmd/check/check.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test/security/k8s/src/check/cmd/check/check.go b/test/security/k8s/src/check/cmd/check/check.go index 80a17f0c5..40e3a092c 100644 --- a/test/security/k8s/src/check/cmd/check/check.go +++ b/test/security/k8s/src/check/cmd/check/check.go @@ -4,6 +4,7 @@ import ( "flag" "log" + "check" "check/rancher" "check/raw" "check/validators/master" @@ -25,23 +26,20 @@ func main() { *rke = true } - var ( - k8sParams []string - err error - ) + var info check.Informer switch { case *ranchercli: - k8sParams, err = rancher.GetK8sParams() + info = &rancher.Rancher{} case *rke: - k8sParams, err = raw.GetK8sParams() + info = &raw.Raw{} default: log.Fatal("Missing cluster access method.") } + apiParams, err := info.GetAPIParams() if err != nil { log.Fatal(err) } - - master.Check(k8sParams) + master.CheckAPI(apiParams) } |