Skip to content

Commit d6ea927

Browse files
committed
fix: solving some issues in the must gather tests
1 parent 74bcc74 commit d6ea927

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

ods_ci/tests/Resources/CLI/MustGather/MustGather.resource

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ Get must-gather Logs
1212
${output}= Run process tests/Resources/CLI/MustGather/get-must-gather-logs.sh shell=yes
1313
Should Be Equal As Integers ${output.rc} 0
1414
Should Not Contain ${output.stdout} FAIL
15-
${must-gather-dir}= Run ls -d must-gather.local.*
16-
${namespaces-log-dir}= Run ls -d ${must-gather-dir}/quay-io-modh-must-gather-sha256-*/namespaces
17-
Set Suite Variable ${must-gather-dir}
18-
Set Suite Variable ${namespaces-log-dir}
19-
Directory Should Exist ${must-gather-dir}
20-
Directory Should Not Be Empty ${must-gather-dir}
15+
${must_gather_dir}= Run ls -d must-gather.local.*
16+
${namespaces_log_dir}= Run ls -d ${must_gather_dir}/quay-io-modh-must-gather-sha256-*/namespaces
17+
Set Suite Variable ${must_gather_dir}
18+
Set Suite Variable ${namespaces_log_dir}
19+
Directory Should Exist ${must_gather_dir}
20+
Directory Should Not Be Empty ${must_gather_dir}
2121

2222
Verify Logs For ${namespace}
2323
[Documentation] Verifies the must-gather logs related to a namespace
24-
Directory Should Exist ${namespaces-log-dir}/${namespace}
25-
Directory Should Not Be Empty ${namespaces-log-dir}/${namespace}
26-
Directory Should Not Be Empty ${namespaces-log-dir}/${namespace}/pods
27-
${log-files}= Run find ${namespaces-log-dir}/${namespace}/pods -type f -name "*.log"
28-
Should Not Be Equal ${log-files} ${EMPTY}
24+
Directory Should Exist ${namespaces_log_dir}/${namespace}
25+
Directory Should Not Be Empty ${namespaces_log_dir}/${namespace}
26+
Directory Should Not Be Empty ${namespaces_log_dir}/${namespace}/pods
27+
${log_files}= Run find ${namespaces_log_dir}/${namespace}/pods -type f -name "*.log"
28+
Should Not Be Equal ${log_files} ${EMPTY}
2929

3030
Cleanup must-gather Logs
3131
[Documentation] Deletes the folder with the must-gather logs
32-
Remove Directory ${must-gather-dir} recursive=True
32+
Run Keyword If "${must_gather_dir}" != "${EMPTY}" Remove Directory ${must_gather_dir} recursive=True

ods_ci/tests/Resources/CLI/MustGather/get-must-gather-logs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
# Redirecting stdout/stderr of must-gather to a file, as it fills up the
33
# process buffer and prevents the script from running further.
4-
oc adm must-gather --image=quay.io/modh/must-gather@sha256:1bd8735d715b624c1eaf484454b0d6d400a334d8cbba47f99883626f36e96657 &> must-gather-results.txt
4+
oc adm must-gather --image=quay.io/modh/must-gather@sha256:9d5988f45c3b00ec7fbbe7a8a86cc149a2768c9c47e207694fdb6e87ef44adf3 &> must-gather-results.txt
55

66
if [ $? -eq 0 ]
77
then

0 commit comments

Comments
 (0)