Skip to content

Commit 0775cdf

Browse files
committed
[fix] the expected network policy content for the ODH execution
This was failing with ODH because there is a different network policy content. I think that the content in ODH is as expected, as such, I have updated our test to match this difference and work properly on both ODH and RHOAI installations.
1 parent b97c986 commit 0775cdf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ods_ci/tests/Resources/Files/expected_ctrl_np.txt renamed to ods_ci/tests/Resources/Files/expected_ctrl_np_template.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"namespaceSelector": {
55
"matchLabels": {
6-
"kubernetes.io/metadata.name": "redhat-ods-applications"
6+
"kubernetes.io/metadata.name": "SELECTOR_LABEL_VALUE"
77
}
88
}
99
}

ods_ci/tests/Tests/100__deploy/100__installation/102__post_install.robot

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ Verify RHODS Notebooks Network Policies
275275
${CR_name} = Get User CR Notebook Name username=${TEST_USER.USERNAME}
276276
${policy_ctrl} = Run
277277
... oc get networkpolicy ${CR_name}-ctrl-np -n ${NOTEBOOKS_NAMESPACE} -o json | jq '.spec.ingress[0]'
278-
${expected_policy_ctrl} = Get File ods_ci/tests/Resources/Files/expected_ctrl_np.txt
278+
${rc} ${expected_policy_ctrl} = Run And Return Rc And Output
279+
... sed "s#SELECTOR_LABEL_VALUE#${APPLICATIONS_NAMESPACE}#" ods_ci/tests/Resources/Files/expected_ctrl_np_template.txt # robocop: disable:line-too-long
279280
Should Be Equal As Strings ${policy_ctrl} ${expected_policy_ctrl}
280281
Log ${policy_ctrl}
281282
Log ${expected_policy_ctrl}

0 commit comments

Comments
 (0)