forked from rookies-sysu/Order-System-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (27 loc) · 757 Bytes
/
Makefile
File metadata and controls
34 lines (27 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
deploy:
docker-compose up -d
sleep 60
curl localhost:8080/api/insert_fake_data2
rebuild:
docker-compose down
docker-compose build web db nginx
docker-compose up -d
redeploy:
docker-compose down
sudo rm -rf /opt/mysql_data
docker-compose build web db nginx
docker-compose up -d
sleep 60
curl localhost:8080/api/insert_fake_data2
dbtest:
# rebuild TINYHIPPOTEST database for unittest
make redeploy
# wait mysql db can connect
while ! nc -z 127.0.0.1 3306; do sleep 3; done
cp -r ./app/dbTools ./tests
cp ./tests/dbConfig_TEST.py ./tests/dbTools/dbConfig.py
# Run the tests
cd tests && python3 test_suite.py
# remove the temp file
rm -rf ./tests/dbTools
# DB TEST Finished! Please check the test result in UnittestTextReport.txt!