Skip to content

Commit

Permalink
chore: e2e test data is consistently the same
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codes committed Sep 20, 2024
1 parent b6038a2 commit 02b9528
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .devcontainer/manually-start-services-for-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ set -o allexport
. $PWD/apps/playnite-web/local.env
set +o allexport

docker kill playnite-web-db mqtt || true
docker container rm playnite-web-db mqtt || true
docker kill playnite-web-db-e2e mqtt || true
docker container rm playnite-web-db-e2e mqtt || true

docker run --name playnite-web-db -d \
rm -rf .data/mongodb-e2e
mkdir -p .data/mongodb-e2e

docker run --name playnite-web-db-e2e -d \
--network host \
-v $PWD/.data/games:/data/backup/games \
-e MONGO_INITDB_ROOT_USERNAME=$DB_USERNAME \
-e MONGO_INITDB_ROOT_PASSWORD=$DB_PASSWORD \
mongo:7.0.3-jammy

docker exec -t playnite-web-db mongorestore --nsInclude games.* /data/backup
docker exec -t playnite-web-db-e2e mongorestore --nsInclude games.* /data/backup

docker run --name mqtt -d \
--network host \
Expand Down

0 comments on commit 02b9528

Please sign in to comment.