Skip to content

Commit b9be10f

Browse files
committed
add tests
1 parent 39d685f commit b9be10f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/cmd/newapp.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ os::cmd::expect_success_and_text 'oc new-app ruby-helloworld-sample --param MYSQ
9595
os::cmd::expect_success_and_text 'oc new-app -e FOO=BAR -f examples/jenkins/jenkins-ephemeral-template.json -o jsonpath="{.items[?(@.kind==\"DeploymentConfig\")].spec.template.spec.containers[0].env[?(@.name==\"FOO\")].value}" ' '^BAR$'
9696
os::cmd::expect_success_and_text 'oc new-app -e OPENSHIFT_ENABLE_OAUTH=false -f examples/jenkins/jenkins-ephemeral-template.json -o jsonpath="{.items[?(@.kind==\"DeploymentConfig\")].spec.template.spec.containers[0].env[?(@.name==\"OPENSHIFT_ENABLE_OAUTH\")].value}" ' 'false'
9797

98+
# check that multiple resource groups are printed with their respective external version
99+
os::cmd::expect_success_and_text 'oc new-app -f examples/prometheus/prometheus.yaml -o yaml' 'apiVersion: apps/v1beta1'
100+
# check that if an --output-version is requested on a list of varying resource kinds, an error is returned if
101+
# at least one of the resource groups does not support the given version
102+
os::cmd::expect_failure_and_text 'oc new-app -f examples/prometheus/prometheus.yaml -o yaml --output-version=v1' 'not suitable for converting'
103+
os::cmd::expect_failure_and_not_text 'oc new-app -f examples/prometheus/prometheus.yaml -o yaml --output-version=extensions/v1beta1' 'not suitable for converting'
104+
os::cmd::expect_failure_and_not_text 'oc new-app -f examples/prometheus/prometheus.yaml -o yaml --output-version=apps/v1beta1' 'not suitable for converting'
105+
98106
# check that an error is produced when using --context-dir with a template
99107
os::cmd::expect_failure_and_text 'oc new-app -f examples/sample-app/application-template-stibuild.json --context-dir=example' '\-\-context-dir is not supported when using a template'
100108

0 commit comments

Comments
 (0)