Skip to content

Commit

Permalink
test(integration): set files var to name of filesvar for nondev nonsi…
Browse files Browse the repository at this point in the history
…mple
  • Loading branch information
trilom committed Mar 25, 2020
1 parent 2eb993c commit 7ce4f8b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/actions/integration/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ prepareTest () {
else
file=$txt_output
fi
elif [ "$dev" == "dev" ] && [ "$1" != "simple_" ]; then
else
declare -n file=${2}
if [ "$4" == "json" ]; then
file="$(cat events/${!file}.json)"
elif [ "$4" == "," ]; then
file="$(cat events/${!file}.csv)"
else
file="$(cat events/${!file}.txt)"
if [ "$dev" == "dev" ]; then
if [ "$4" == "json" ]; then
file="$(cat events/${!file}.json)"
elif [ "$4" == "," ]; then
file="$(cat events/${!file}.csv)"
else
file="$(cat events/${!file}.txt)"
fi
fi
fi
echo "${file}"
Expand Down Expand Up @@ -96,7 +98,7 @@ testResults () {
if [ "$2" == 'json' ]; then
expected=$(($expected+1))
fi
if [ $3 != $expected ]; then
if [ "$3" != "$expected" ]; then
echo -e "\t\033[1;91mTest failure $5/($1)$4:'$2' { EXPECTED:$expected RECEIVED:$3 } \033[0m"
exit 1;
fi
Expand Down

0 comments on commit 7ce4f8b

Please sign in to comment.