Skip to content

Commit c7de01e

Browse files
author
OpenShift Bot
authored
Merge pull request #10250 from juanvallejo/jvallejo_err-oc-run-on-invalid-image
Merged by openshift-bot
2 parents 4f6472f + be9e8ea commit c7de01e

File tree

2 files changed

+27
-0
lines changed
  • test/cmd
  • vendor/k8s.io/kubernetes/pkg/kubectl/cmd

2 files changed

+27
-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

vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run.go

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)