Skip to content

Commit

Permalink
[Fix] cleanup for the dashboard api tests
Browse files Browse the repository at this point in the history
The cleanup only checked for resources of two users but in the tests
there are used three different users, so let's clean after all three.
  • Loading branch information
jstourac committed Mar 25, 2024
1 parent abfb8a5 commit fc76761
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -835,21 +835,22 @@ Delete Dummy ConfigMaps
Delete Test Notebooks CRs And PVCs From CLI
[Documentation] Stops all the notebook servers spanwed during a test by
... deleting their CRs. At the end it closes any opened browsers
${CR_1}= Get User CR Notebook Name ${TEST_USER_3.USERNAME}
${CR_2}= Get User CR Notebook Name ${TEST_USER_4.USERNAME}
${test_crs}= Create List ${CR_1} ${CR_2}
FOR ${nb_cr} IN @{test_crs}
${present}= Run Keyword And Return Status OpenshiftLibrary.Oc Get kind=Notebook namespace=${NOTEBOOK_NS} name=${nb_cr}
${test_usernames}= Create List ${TEST_USER.USERNAME} ${TEST_USER_3.USERNAME} ${TEST_USER_4.USERNAME}
FOR ${username} IN @{test_usernames}
${nb_cr}= Get User CR Notebook Name ${username}
${present}= Run Keyword And Return Status
... OpenshiftLibrary.Oc Get kind=Notebook namespace=${NOTEBOOK_NS} name=${nb_cr}
IF ${present} == ${FALSE}
Continue For Loop
ELSE
OpenshiftLibrary.Oc Delete kind=Notebook namespace=${NOTEBOOK_NS} name=${nb_cr}
END
END
Close All Browsers
${PVC_ADMIN_USER}= Get User Notebook PVC Name ${TEST_USER.USERNAME}
${PVC_BASIC_USER}= Get User Notebook PVC Name ${TEST_USER_3.USERNAME}
${PVC_BASIC_USER_2}= Get User Notebook PVC Name ${TEST_USER_4.USERNAME}
${test_pvcs}= Create List ${PVC_BASIC_USER} ${PVC_BASIC_USER_2}
${test_pvcs}= Create List ${PVC_ADMIN_USER} ${PVC_BASIC_USER} ${PVC_BASIC_USER_2}
Delete Test PVCs pvc_names=${test_pvcs}

Set Username In Secret Payload
Expand Down

0 comments on commit fc76761

Please sign in to comment.