test script and static config

master
NatureFreshMilk 2019-09-09 14:46:39 +02:00
parent 2e185489d3
commit ba2178e26f
4 changed files with 28 additions and 7 deletions

View File

@ -3,14 +3,8 @@ language: generic
services:
- docker
before_install:
- mkdir -p /tmp/mt/worlds/world
- chmod 777 /tmp/mt -Rv
- echo "enable_integration_test = true" > minetest.conf
- docker run --rm -it -v $(pwd)/minetest.conf:/etc/minetest/minetest.conf -v /tmp/mt:/var/lib/minetest/.minetest -v $(pwd):/var/lib/minetest/.minetest/worlds/world/worldmods registry.gitlab.com/minetest/minetest/server:5.0.1
script:
- test -f /tmp/mt/worlds/world/integration_test.json
- ./test.sh
notifications:
email: false

View File

@ -58,3 +58,8 @@ mail
mapserver
geoip
```
## Testing
The mod collection can be tested with the `test.sh` script.
prerequisite is a working docker setup

10
test-minetest.conf Normal file
View File

@ -0,0 +1,10 @@
# integration test settings
enable_integration_test = true
areas.self_protection = true
mesecon.luacontroller_lightweight_interrupts = true
moreblocks.stairsplus_in_creative_inventory = false
bridger_enable_trusses = true
telemosaic_right_click_teleport = true

12
test.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# simple integration test
mkdir -p /tmp/mt/worlds/world
chmod 777 /tmp/mt -Rv
docker run --rm -it \
-v $(pwd)/test-minetest.conf:/etc/minetest/minetest.conf \
-v /tmp/mt:/var/lib/minetest/.minetest \
-v $(pwd):/var/lib/minetest/.minetest/worlds/world/worldmods \
registry.gitlab.com/minetest/minetest/server:5.0.1
test -f /tmp/mt/worlds/world/integration_test.json && exit 0 || exit 1