Skip to content

Commit

Permalink
Improve testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Jul 23, 2024
1 parent 5bcdcd9 commit 6764daf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ test() {
while [ ! "$(docker inspect --format '{{json .State.Health.Status }}' metacall_builder_registry)" = "\"healthy\"" ]; do
sleep 5
done
docker run --rm -v ./test/suites:/test -t localhost:5000/metacall/builder_output sh -c "metacallcli $1"
DOCKER_OUTPUT=`docker run --rm -v ./test/suites:/test -t localhost:5000/metacall/builder_output sh -c "metacallcli test/$1"`

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

${DOCKER_CMD} down
}

Expand Down

0 comments on commit 6764daf

Please sign in to comment.