Skip to content

Commit

Permalink
Remove need for seed_database() in tests since db should already ha…
Browse files Browse the repository at this point in the history
…ve been seeded
  • Loading branch information
leojonathanoh committed Nov 10, 2023
1 parent 94d782a commit db62b25
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,12 @@ cleanup_test() {
trap cleanup_test INT TERM EXIT

echo "Testing..."
seed_database() {
(
cd ..
docker exec $( docker compose ps -q db ) mysql -h db -uroot -pascent bf2stats -e 'UPDATE stats_provider SET authorized = 1 WHERE id = 1'
docker exec $( docker compose ps -q db ) mysql -h db -uroot -pascent bf2stats -e 'SELECT * FROM stats_provider'
docker exec $( docker compose ps -q db ) mysql -h db -uroot -pascent bf2stats -e "UPDATE stats_provider_auth_ip SET address = '0.0.0.0/0' "
docker exec $( docker compose ps -q db ) mysql -h db -uroot -pascent bf2stats -e 'SELECT * FROM stats_provider_auth_ip'
)
}
if [ "$TEST" = 'dev' ]; then
setup() {
(cd .. && docker compose -f docker-compose.yml $CACHE up --build -d)
}
run() {
docker exec $( docker compose ps -q test-container-networking ) ./test-ready.sh
seed_database
docker exec $( docker compose ps -q test-container-networking ) ./test-routes.sh
docker exec $( docker compose ps -q test-container-networking ) ./test-snapshots.sh
# docker exec $( docker compose ps -q test-container-networking ) ./test-internal-dns.sh
Expand All @@ -71,7 +61,6 @@ if [ "$TEST" = 'prod' ]; then
}
run() {
docker exec $( docker compose ps -q test-container-networking ) ./test-ready.sh
seed_database
docker exec $( docker compose ps -q test-container-networking ) ./test-routes.sh
docker exec $( docker compose ps -q test-host-networking ) ./test-endpoints.sh
docker exec $( docker compose ps -q test-container-networking ) ./test-snapshots.sh
Expand Down

0 comments on commit db62b25

Please sign in to comment.