Skip to content

Commit b5de697

Browse files
committed
add test case
1 parent 8c49de4 commit b5de697

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/cmd/run.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
set -o nounset
5+
set -o pipefail
6+
7+
OS_ROOT=$(dirname "${BASH_SOURCE}")/../..
8+
source "${OS_ROOT}/hack/lib/init.sh"
9+
os::log::stacktrace::install
10+
trap os::test::junit::reconcile_output EXIT
11+
12+
os::test::junit::declare_suite_start "cmd/run"
13+
# This test validates the value of --image for oc run
14+
os::cmd::expect_success_and_text 'oc run newdcforimage --image=validimagevalue' 'deploymentconfig "newdcforimage" created'
15+
os::cmd::expect_failure_and_text 'oc run newdcforimage2 --image="InvalidImageValue0192"' 'error: Invalid image name "InvalidImageValue0192": invalid reference format'
16+
echo "oc run: ok"
17+
os::test::junit::declare_suite_end

0 commit comments

Comments
 (0)