-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f749c06
commit 4617957
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Navigate to the application directory where docker-compose.yml is located | ||
cd application | ||
|
||
# Start only the database service | ||
docker-compose up -d database | ||
|
||
# Wait for 10 seconds to allow the database to initialize | ||
echo "Waiting for the database service to initialize... Sleeping for 15 seconds" | ||
sleep 15 | ||
|
||
# Navigate to the tests directory and run unittests | ||
echo "Running tests..." | ||
cd app/tests | ||
python -m unittest discover | ||
|
||
# Navigate back to the application directory | ||
echo "Shutting down services..." | ||
cd ../../.. | ||
|
||
# Shut down all services | ||
./cleanup.sh | ||
./purge_db.sh | ||
echo "Testing and cleanup completed." |