| ... | ... |
@@ -339,17 +339,6 @@ os::test::junit::declare_suite_end |
| 339 | 339 |
# service accounts should not be allowed to request new projects |
| 340 | 340 |
os::cmd::expect_failure_and_text "oc new-project --token='$( oc sa get-token builder )' will-fail" 'Error from server: You may not request a new project via this API' |
| 341 | 341 |
|
| 342 |
-# test oc projects |
|
| 343 |
-os::cmd::expect_failure_and_text 'oc projects test_arg' 'no arguments' |
|
| 344 |
-os::cmd::expect_success_and_text 'oc projects' 'You have access' |
|
| 345 |
-# log in as a test user and expect no projects |
|
| 346 |
-os::cmd::expect_success 'oc login -u test -p test' |
|
| 347 |
-os::cmd::expect_success_and_text 'oc projects' 'You are not a member of any projects' |
|
| 348 |
-# add a project and expect text for a single project |
|
| 349 |
-os::cmd::expect_success_and_text 'oc new-project test4; sleep 2; oc projects' 'You have one project on this server: "test4".' |
|
| 350 |
-os::cmd::expect_success_and_text 'oc new-project test5; sleep 2; oc projects' 'You have access' |
|
| 351 |
-echo 'projects command ok' |
|
| 352 |
- |
|
| 353 | 342 |
os::test::junit::declare_suite_start "cmd/basicresources/patch" |
| 354 | 343 |
# Validate patching works correctly |
| 355 | 344 |
os::cmd::expect_success 'oc login -u system:admin' |
| 356 | 345 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,21 @@ |
| 0 |
+#!/bin/bash |
|
| 1 |
+ |
|
| 2 |
+set -o errexit |
|
| 3 |
+set -o nounset |
|
| 4 |
+set -o pipefail |
|
| 5 |
+ |
|
| 6 |
+OS_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
|
| 7 |
+source "${OS_ROOT}/hack/lib/init.sh"
|
|
| 8 |
+os::log::stacktrace::install |
|
| 9 |
+trap os::test::junit::reconcile_output EXIT |
|
| 10 |
+ |
|
| 11 |
+os::test::junit::declare_suite_start "cmd/projects" |
|
| 12 |
+os::cmd::expect_failure_and_text 'oc projects test_arg' 'no arguments' |
|
| 13 |
+# log in as a test user and expect no projects |
|
| 14 |
+os::cmd::expect_success 'oc login -u test -p test' |
|
| 15 |
+os::cmd::expect_success_and_text 'oc projects' 'You are not a member of any projects' |
|
| 16 |
+# add a project and expect text for a single project |
|
| 17 |
+os::cmd::expect_success_and_text 'oc new-project test4; sleep 2; oc projects' 'You have one project on this server: "test4".' |
|
| 18 |
+os::cmd::expect_success_and_text 'oc new-project test5; sleep 2; oc projects' 'You have access' |
|
| 19 |
+echo 'projects command ok' |
|
| 20 |
+os::test::junit::declare_suite_end |