-
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.
Merge pull request #106 from seng499-company2/integration-test
Integration test
- Loading branch information
Showing
13 changed files
with
182 additions
and
139 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 |
---|---|---|
|
@@ -4,3 +4,4 @@ data/ | |
.idea/ | ||
.env.* | ||
/schedule.json | ||
/.db_init_done |
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
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
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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
#!/bin/bash | ||
cd data | ||
|
||
FILE=.db_init_done | ||
if [ -f "$FILE" ]; then | ||
echo "db already initialized... skipping" | ||
else | ||
cd ../ | ||
docker compose run web python initialize.py | ||
cd data | ||
touch .db_init_done | ||
fi |
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,47 @@ | ||
#!/usr/bin/bash | ||
|
||
echo '------------------------------------' | ||
echo '| Starting Integration Test |' | ||
echo '------------------------------------' | ||
|
||
docker-compose up -d | ||
|
||
sleep 3 | ||
|
||
./init_db.sh | ||
|
||
sleep 3 | ||
|
||
echo ' ' | ||
echo '------------------------------------' | ||
echo '| Testing Company 2 |' | ||
echo '------------------------------------' | ||
echo ' ' | ||
echo ' ' | ||
|
||
curl http://localhost:8000/schedule/2022/FALL/2 | ||
|
||
echo ' ' | ||
echo ' ' | ||
echo ' ' | ||
echo '------------------------------------' | ||
echo '| Testing Company 1 |' | ||
echo '------------------------------------' | ||
echo ' ' | ||
echo ' ' | ||
echo ' ' | ||
|
||
curl http://localhost:8000/schedule/2022/FALL/1 | ||
|
||
|
||
echo ' ' | ||
echo ' ' | ||
echo ' ' | ||
echo '------------------------------------' | ||
echo '| Testing Complete |' | ||
echo '------------------------------------' | ||
echo ' ' | ||
echo ' ' | ||
echo ' ' | ||
|
||
docker-compose down |
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,16 @@ | ||
#!/bin/bash | ||
|
||
docker-compose down | ||
|
||
sudo rm -rf data | ||
|
||
docker-compose up -d --build | ||
|
||
docker-compose exec web python manage.py makemigrations | ||
docker-compose exec web python manage.py migrate | ||
|
||
rm .db_init_done | ||
|
||
./init_db.sh | ||
|
||
docker-compose down |
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
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
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
Oops, something went wrong.