travelnet/integration-test.sh
David Leal 696548f6d3
Add integration test (based on 3D Armor's integration test) (#7)
* Add integration test (based from 3D Armor's...

...integration test).

* Add Integration Test status badge

* make the `integration-test.sh` file executable

Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
2020-11-04 12:05:17 -06:00

21 lines
522 B
Bash
Executable File

#!/bin/sh
# simple integration test
CFG=/tmp/minetest.conf
MTDIR=/tmp/mt
WORLDDIR=${MTDIR}/worlds/world
cat <<EOF > ${CFG}
travelnet.enable_travelnet_integration_test = true
EOF
mkdir -p ${WORLDDIR}
chmod 777 ${MTDIR} -R
docker run --rm -i \
-v ${CFG}:/etc/minetest/minetest.conf:ro \
-v ${MTDIR}:/var/lib/minetest/.minetest \
-v $(pwd):/var/lib/minetest/.minetest/worlds/world/worldmods/travelnet \
registry.gitlab.com/minetest/minetest/server:5.3.0
test -f ${WORLDDIR}/integration_test.json && exit 0 || exit 1