technic/integration-test.sh

27 lines
756 B
Bash
Raw Normal View History

2020-01-16 15:59:02 +01:00
#!/bin/sh
# simple integration test
CFG=/tmp/minetest.conf
MTDIR=/tmp/mt
WORLDDIR=${MTDIR}/worlds/world
2020-01-17 08:10:45 +01:00
WORLDMODDIR=${WORLDDIR}/worldmods
2020-01-16 15:59:02 +01:00
2020-01-17 08:10:45 +01:00
# settings
2020-01-16 15:59:02 +01:00
cat <<EOF > ${CFG}
enable_technic_integration_test = true
EOF
2020-01-17 08:10:45 +01:00
rm -rf ${WORLDDIR}
mkdir -p ${WORLDMODDIR}
git clone https://gitlab.com/VanessaE/basic_materials.git ${WORLDMODDIR}/basic_materials
git clone https://gitlab.com/VanessaE/pipeworks.git ${WORLDMODDIR}/pipeworks
2020-01-16 15:59:02 +01:00
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/technic \
2020-05-09 21:02:19 +02:00
registry.gitlab.com/minetest/minetest/server:${MINETEST_VERSION}
2020-01-16 15:59:02 +01:00
test -f ${WORLDDIR}/integration_test.json && exit 0 || exit 1