You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/cmd/config.sh
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -34,13 +34,13 @@ os::cmd::expect_success_and_not_text 'oc get bc' 'does not exist'
34
34
# need some level of default (both upstream and here) to get the pretty auth message because you fail on namespace first.
35
35
os::cmd::expect_failure_and_text 'KUBERNETES_MASTER=anything env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --user="test"''auth info "test" does not exist'
36
36
37
-
os::cmd::expect_failure_and_text 'oc get bc --config=missing''missing: no such file or directory'
37
+
os::cmd::expect_failure_and_text 'oc get bc --kubeconfig=missing''missing: no such file or directory'
38
38
39
39
# define temp location for new config
40
40
NEW_CONFIG_LOC="${BASETMPDIR}/new-config.yaml"
41
41
42
42
# make sure non-existing --cluster and --user can still be set
os::cmd::expect_success_and_text "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${MASTER_CONFIG_DIR}/ca.crt' -u no-project-test-user -p anything""You don't have any projects. Contact your system administrator to request a project"
49
49
# make sure standard login prompt is printed once self-provisioner status is restored
os::cmd::expect_success_and_text "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${MASTER_CONFIG_DIR}/ca.crt' -u no-project-test-user -p anything""You don't have any projects. You can try to create a new project, by running"
52
52
# make sure `oc login` fails with unauthorized error
@@ -87,7 +87,7 @@ os::cmd::expect_failure_and_text 'oc get pods' '"system:anonymous" cannot list p
87
87
88
88
# make sure we report an error if the config file we pass is not writable
89
89
# Does not work inside of a container, determine why and reenable
90
-
# os::cmd::expect_failure_and_text "oc login '${KUBERNETES_MASTER}' -u test -p test '--config=${templocation}/file' --insecure-skip-tls-verify" 'KUBECONFIG is set to a file that cannot be created or modified'
90
+
# os::cmd::expect_failure_and_text "oc login '${KUBERNETES_MASTER}' -u test -p test '--kubeconfig=${templocation}/file' --insecure-skip-tls-verify" 'KUBECONFIG is set to a file that cannot be created or modified'
91
91
echo"login warnings: ok"
92
92
93
93
# login and create serviceaccount and test login and logout with a service account token
# alternate-cluster-admin should NOT have the power add back star now (anything other than star is considered less so this mimics testing against no groups)
os::cmd::expect_failure_and_text "oc replace --config=${new_kubeconfig} clusterrole/alternate-cluster-admin -f ${workingdir}/alternate_cluster_admin.yaml""attempt to grant extra privileges"
275
+
os::cmd::expect_failure_and_text "oc replace --kubeconfig=${new_kubeconfig} clusterrole/alternate-cluster-admin -f ${workingdir}/alternate_cluster_admin.yaml""attempt to grant extra privileges"
276
276
277
277
# This test validates cluster level policy for serviceaccounts
278
278
# ensure service account cannot list pods at the namespace level
os::cmd::expect_success_and_text "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${MASTER_CONFIG_DIR}/ca.crt' -u test-user -p anything""You don't have any projects. You can try to create a new project, by running"
42
42
43
43
# make sure `oc status` re-uses the correct "no projects" message from `oc login`
0 commit comments