crowdsec/tests/instance-db
mmetc 0667552132
bats: postgres tests (#1377)
* split CI/bats in sqlite+mysql+mariadb+hub
* renamed db and user 'crowdsec' to 'crowdsec-test'; moved backend-specific scripts to lib/db, etc.
* postgres tests
* force delay between ipv6 tests (for myisam)
* force delay after pg_restore to ensure data is written
2022-03-21 15:51:05 +01:00

18 lines
373 B
Bash
Executable file

#!/usr/bin/env bash
#shellcheck disable=SC1007
THIS_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
cd "${THIS_DIR}"
#shellcheck disable=SC1090
. ./.environment.sh
./assert-crowdsec-not-running
backend_script="./lib/db/instance-${DB_BACKEND}"
if [ ! -x "$backend_script" ]; then
echo "unknown database '$DB_BACKEND'" >&2
exit 1
fi
exec "$backend_script" "$@"