Skip to content

Commit

Permalink
added script for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamad11Dab committed May 26, 2024
1 parent f749c06 commit 4617957
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions unittest.sh
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."

0 comments on commit 4617957

Please sign in to comment.