Skip to content

Commit

Permalink
Simplify and fix docker test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 authored Aug 18, 2024
1 parent 9bd1f24 commit d89170c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
6 changes: 3 additions & 3 deletions utils/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ trap 'rm -rf "$world" || :' EXIT

[ -f game.conf ] || { echo "Must be run in game root folder." >&2; exit 1; }

cp -v utils/test/world.mt "$world/"
chmod -R a+rwX "$world" # needed because server runs as unprivileged user inside container
chmod -R 777 "$world" # container uses unprivileged user inside

vol=(
-v "$PWD/utils/test/minetest.conf":/etc/minetest/minetest.conf
Expand All @@ -14,6 +13,7 @@ vol=(
-v "$world":/var/lib/minetest/.minetest/world
)
[ -z "$DOCKER_IMAGE" ] && DOCKER_IMAGE="ghcr.io/minetest/minetest:master"
docker run --rm -i "${vol[@]}" "$DOCKER_IMAGE"
docker run --rm -i "${vol[@]}" "$DOCKER_IMAGE" --config /etc/minetest/minetest.conf --gameid minetest

test -f "$world/map.sqlite" || exit 1
exit 0
7 changes: 0 additions & 7 deletions utils/test/world.mt

This file was deleted.

0 comments on commit d89170c

Please sign in to comment.