Skip to content

Commit 2e29c9c

Browse files
committed
add test for origin resources
1 parent 845259a commit 2e29c9c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

test/cmd/explain.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
3+
trap os::test::junit::reconcile_output EXIT
4+
5+
# Cleanup cluster resources created by this test
6+
(
7+
set +e
8+
oc delete all,templates --all
9+
exit 0
10+
) &>/dev/null
11+
12+
13+
os::test::junit::declare_suite_start "cmd/explain"
14+
# This test validates that the explain command works with openshift resources
15+
16+
os::cmd::expect_success 'oc explain dc'
17+
os::cmd::expect_success_and_text 'oc explain dc.status.replicas' 'FIELD\: replicas'
18+
19+
os::cmd::expect_success 'oc explain routes'
20+
os::cmd::expect_success_and_text 'oc explain route.metadata.name' 'string'
21+
22+
os::cmd::expect_success 'oc explain bc'
23+
os::cmd::expect_success 'oc explain image'
24+
os::cmd::expect_success 'oc explain is'
25+
26+
echo "explain: ok"
27+
os::test::junit::declare_suite_end
28+

0 commit comments

Comments
 (0)