From 02b9528756e50b14ab63b1157e22e47f5cc8ad5c Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Fri, 20 Sep 2024 12:05:40 -0400 Subject: [PATCH] chore: e2e test data is consistently the same --- .devcontainer/manually-start-services-for-e2e.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.devcontainer/manually-start-services-for-e2e.sh b/.devcontainer/manually-start-services-for-e2e.sh index 5409158ad..fc802775d 100755 --- a/.devcontainer/manually-start-services-for-e2e.sh +++ b/.devcontainer/manually-start-services-for-e2e.sh @@ -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 \