tests can be run in a dockercontainer now. (just start ./tests/run_tests_docker to magically do it) changed time patching during testing to use mocktime() instead. fixed alpine issues. fixed #206

This commit is contained in:
Edwin Eefting
2023-10-02 23:15:37 +02:00
parent 5cca819916
commit 8b8be80ab7
24 changed files with 236 additions and 202 deletions

16
tests/run_tests_docker Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
set -e
#remove stuff from previous local tests
zpool destroy test_source1 2>/dev/null || true
zpool destroy test_source2 2>/dev/null || true
zpool destroy test_target1 2>/dev/null || true
#is needed
modprobe brd rd_size=512000 || true
# builds and starts a docker container to run the test suite
docker build -t zfs-autobackup-test -f tests/Dockerfile .
docker run --name zfs-autobackup-test --privileged --rm -it -v .:/app zfs-autobackup-test $@