From e09c4bb54dae0bb31fd4dba85392cfbc76b70887 Mon Sep 17 00:00:00 2001 From: David Elie-Dit-Cosaque <86730676+edcdavid@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:49:20 -0600 Subject: [PATCH] skip operator if claim file couldn't be parsed (#1714) * skip operator if claim file couldn't be parsed * addressing comments from David R. --- run-basic-batch-operators-test.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/run-basic-batch-operators-test.sh b/run-basic-batch-operators-test.sh index 89781e05d..404a58429 100755 --- a/run-basic-batch-operators-test.sh +++ b/run-basic-batch-operators-test.sh @@ -319,6 +319,28 @@ while IFS=, read -r package_name catalog; do cleanup waitDeleteNamespace "$ns" + # Check parsing claim file + ./tnf claim show csv -c "$reportDir"/claim.json -n "$package_name" -t "$CNF_TYPE" "$addHeaders" || { + + # if parsing claim file fails, skip this operator + # Add per operator links + { + # Add error message + echo "Results for: $package_name, "'Operator installation failed due to claim parsing error, skipping test' + + # Add tnf_config link + echo ", tnf_config: " + echo ''"link"'' + + # New line + echo "
" + } >>"$REPORT_FOLDER/$INDEX_FILE" + + cleanup + + continue + } + # merge claim.json from each operator to a single csv file ./tnf claim show csv -c "$reportDir"/claim.json -n "$package_name" -t "$CNF_TYPE" "$addHeaders" >>"$REPORT_FOLDER"/results.csv