You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
os::cmd::expect_failure_and_text 'oc process name1 name2''template name must be specified only once'
18
18
# fail to pass a filename or template by name
19
19
os::cmd::expect_failure_and_text 'oc process''Must pass a filename or name of stored template'
20
-
# can't ask for parameters and try process the template
20
+
# can't ask for parameters and try process the template (include tests for deprecated -v/--value)
21
21
os::cmd::expect_failure_and_text 'oc process template-name --parameters --value=someval''\-\-parameters flag does not process the template, can.t be used with \-\-value'
22
22
os::cmd::expect_failure_and_text 'oc process template-name --parameters -v someval''\-\-parameters flag does not process the template, can.t be used with \-\-value'
23
+
os::cmd::expect_failure_and_text 'oc process template-name --parameters --param=someval''\-\-parameters flag does not process the template, can.t be used with \-\-param'
24
+
os::cmd::expect_failure_and_text 'oc process template-name --parameters -p someval''\-\-parameters flag does not process the template, can.t be used with \-\-param'
23
25
os::cmd::expect_failure_and_text 'oc process template-name --parameters --labels=someval''\-\-parameters flag does not process the template, can.t be used with \-\-labels'
24
26
os::cmd::expect_failure_and_text 'oc process template-name --parameters -l someval''\-\-parameters flag does not process the template, can.t be used with \-\-labels'
25
27
os::cmd::expect_failure_and_text 'oc process template-name --parameters --output=someval''\-\-parameters flag does not process the template, can.t be used with \-\-output'
os::cmd::expect_failure_and_text 'oc process template-name --parameters --template=someval''\-\-parameters flag does not process the template, can.t be used with \-\-template'
30
32
os::cmd::expect_failure_and_text 'oc process template-name --parameters -t someval''\-\-parameters flag does not process the template, can.t be used with \-\-template'
31
33
32
-
# providing a value more than once should fail
34
+
# providing a value more than once should fail (include tests for deprecated -v/--value)
33
35
os::cmd::expect_failure_and_text 'oc process template-name key=value key=value''provided more than once: key'
34
36
os::cmd::expect_failure_and_text 'oc process template-name --value=key=value --value=key=value''provided more than once: key'
37
+
os::cmd::expect_failure_and_text 'oc process template-name --param=key=value --param=key=value''provided more than once: key'
35
38
os::cmd::expect_failure_and_text 'oc process template-name key=value --value=key=value''provided more than once: key'
39
+
os::cmd::expect_failure_and_text 'oc process template-name key=value --param=key=value''provided more than once: key'
36
40
os::cmd::expect_failure_and_text 'oc process template-name key=value other=foo --value=key=value --value=other=baz''provided more than once: key, other'
41
+
os::cmd::expect_failure_and_text 'oc process template-name key=value other=foo --param=key=value --param=other=baz''provided more than once: key, other'
os::cmd::expect_success_and_text 'oc get user someval -o jsonpath={.Name}''someval'
61
+
os::cmd::expect_success_and_text 'oc get user someval=moreval -o jsonpath={.Name}''someval=moreval'
62
+
os::cmd::expect_success_and_text 'oc get user someval=moreval2 -o jsonpath={.Name}''someval=moreval2'
63
+
os::cmd::expect_success_and_text 'oc get user someval=moreval3 -o jsonpath={.Name}''someval=moreval3'
51
64
# providing a value not in the template should fail
52
65
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --value=required_param=someval --value=other_param=otherval"'unknown parameter name "other_param"'
66
+
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --param=required_param=someval --param=other_param=otherval"'unknown parameter name "other_param"'
53
67
# failure on values fails the entire call
54
68
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --value=required_param=someval --value=optional_param"'invalid parameter assignment in'
69
+
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --param=required_param=someval --param=optional_param"'invalid parameter assignment in'
55
70
# failure on labels fails the entire call
56
71
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --value=required_param=someval --labels======"'error parsing labels'
72
+
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --param=required_param=someval --labels======"'error parsing labels'
57
73
58
74
# values are not split on commas, required parameter is not recognized
59
75
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --value=optional_param=a,required_param=b"'parameter required_param is required and must be specified'
60
-
# warning is printed iff --value looks like two k-v pairs separated by comma
76
+
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --param=optional_param=a,required_param=b"'parameter required_param is required and must be specified'
77
+
# warning is printed iff --value/--param looks like two k-v pairs separated by comma
61
78
os::cmd::expect_success_and_text "oc process -f '${required_params}' --value=required_param=a,b=c,d"'no longer accepts comma-separated list'
62
79
os::cmd::expect_success_and_not_text "oc process -f '${required_params}' --value=required_param=a_b_c_d"'no longer accepts comma-separated list'
63
80
os::cmd::expect_success_and_not_text "oc process -f '${required_params}' --value=required_param=a,b,c,d"'no longer accepts comma-separated list'
81
+
os::cmd::expect_success_and_text "oc process -f '${required_params}' --param=required_param=a,b=c,d"'no longer accepts comma-separated list'
82
+
os::cmd::expect_success_and_not_text "oc process -f '${required_params}' --param=required_param=a_b_c_d"'no longer accepts comma-separated list'
83
+
os::cmd::expect_success_and_not_text "oc process -f '${required_params}' --param=required_param=a,b,c,d"'no longer accepts comma-separated list'
64
84
# warning is not printed for template values passed as positional arguments
65
85
os::cmd::expect_success_and_not_text "oc process -f '${required_params}' required_param=a,b=c,d"'no longer accepts comma-separated list'
66
86
67
87
# set template parameter to contents of file
68
88
os::cmd::expect_success_and_text "oc process -f '${required_params}' --value=required_param='`cat ${OS_ROOT}/test/testdata/multiline.txt`'"'also,with=commas'
89
+
os::cmd::expect_success_and_text "oc process -f '${required_params}' --param=required_param='`cat ${OS_ROOT}/test/testdata/multiline.txt`'"'also,with=commas'
0 commit comments