Skip to content

Commit

Permalink
skip operator if claim file couldn't be parsed (#1714)
Browse files Browse the repository at this point in the history
* skip operator if claim file couldn't be parsed
* addressing comments from David R.
  • Loading branch information
edcdavid authored Dec 12, 2023
1 parent 19f0ed1 commit e09c4bb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions run-basic-batch-operators-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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: <b>$package_name</b>, "'<span style="color: red;">Operator installation failed due to claim parsing error, skipping test</span>'

# Add tnf_config link
echo ", tnf_config: "
echo '<a href="/'"$REPORT_FOLDER_RELATIVE"'/'"$package_name"'/tnf_config.yml">'"link"'</a>'

# New line
echo "<br>"
} >>"$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

Expand Down

0 comments on commit e09c4bb

Please sign in to comment.