mirror of
https://github.com/offen/docker-volume-backup.git
synced 2026-04-22 08:32:40 +02:00
Allow multiple schedules in the same container (#78)
* Allow mounting of config directory for multiple schedules * Add docs for conf.d feature * Fix behavior on multiple files * Define default case first in entrypoint script
This commit is contained in:
26
test/confd/run.sh
Executable file
26
test/confd/run.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
mkdir -p local
|
||||
|
||||
docker-compose up -d
|
||||
|
||||
# sleep until a backup is guaranteed to have happened on the 1 minute schedule
|
||||
sleep 100
|
||||
|
||||
docker-compose down --volumes
|
||||
|
||||
if [ ! -f ./local/conf.tar.gz ]; then
|
||||
echo "[TEST:FAIL] Config from file was not used."
|
||||
exit 1
|
||||
fi
|
||||
echo "[TEST:PASS] Config from file was used."
|
||||
|
||||
if [ -f ./local/never.tar.gz ]; then
|
||||
echo "[TEST:FAIL] Unexpected file was found."
|
||||
exit 1
|
||||
fi
|
||||
echo "[TEST:PASS] Unexpected cron did not run."
|
||||
Reference in New Issue
Block a user