Skip to content

Commit

Permalink
Solve issues from test comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Jul 23, 2024
1 parent fd039a7 commit 190481b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ test() {
sleep 5
done

DOCKER_OUTPUT=`docker run --rm -v ./test/suites:/test -t localhost:5000/metacall/builder_output sh -c "metacallcli test/$1" | tr -d '\n'`
DOCKER_OUTPUT=`docker run --rm -v ./test/suites:/test -t localhost:5000/metacall/builder_output sh -c "metacallcli test/$1" | xargs`
EXPECTED_OUTPUT=`echo "$2" | xargs`

if [ "${DOCKER_OUTPUT}" = "$2" ]; then
if [ "${DOCKER_OUTPUT}" = "${EXPECTED_OUTPUT}" ]; then
echo "Test passed: $1"
else
echo "Failed to run test: $1"
echo "Expected output was: $2"
echo "Expected output was: ${EXPECTED_OUTPUT}"
echo "Test output was: ${DOCKER_OUTPUT}"
exit 1
fi
Expand Down

0 comments on commit 190481b

Please sign in to comment.