Skip to content

Commit

Permalink
created test script
Browse files Browse the repository at this point in the history
  • Loading branch information
AronBuzogany committed Feb 23, 2024
1 parent e8d0c5f commit bbbb9e7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions backend/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# Run Docker Compose to build and start the services, and capture the exit code from the test runner service
docker-compose -f tests.yaml up --build --exit-code-from test-runner

# Store the exit code in a variable
exit_code=$?

# After the tests are finished, stop and remove the containers
docker-compose -f tests.yaml down

# Check the exit code to determine whether the tests passed or failed
if [ $exit_code -eq 0 ]; then
echo "Tests passed!"
else
echo "Tests failed!"
fi

# Exit with the same exit code as the test runner service
exit $exit_code

0 comments on commit bbbb9e7

Please sign in to comment.