mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
CI: Add options to initialize and cleanup database to runTestsuite.sh
Change-Id: I352333233bab5377723bf37d490ba84fc55bc853
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
CIDIR=$(dirname $(readlink -fn $0))
|
||||
CLEANUP_DB=0
|
||||
source $CIDIR/ci.functions
|
||||
|
||||
cp test-config.orig.yaml test-config.yaml
|
||||
psql --username=asterisk --host=localhost --db=asterisk --command='DROP OWNED BY asterisk CASCADE'
|
||||
if [ $CLEANUP_DB -gt 0 ] ; then
|
||||
sudo -u postgres dropdb -e asterisk_test >/dev/null 2>&1 || :
|
||||
sudo -u postgres dropuser -e asterisk_test >/dev/null 2>&1 || :
|
||||
sudo odbcinst -u -d -n "PostgreSQL-Asterisk-Test"
|
||||
sudo odbcinst -u -s -l -n "asterisk-connector-test"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user