]> scripts.mit.edu Git - wizard.git/blobdiff - tests/mediawiki-backup-restore-test.sh
Fix non-zero shell exit code and --continue in wrong directory.
[wizard.git] / tests / mediawiki-backup-restore-test.sh
index bb7b34515d3acf41a9e28c3f915b4296e8810978..e9dc282a65b6559088af43d348ff4d97de94371b 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash -e
+cd `dirname $0`
 
 TESTNAME="mediawiki_backup_restore"
 source ./setup
@@ -13,8 +14,8 @@ mv "$FROB" "$FROB.bak"
 echo "BOOM" > "$FROB"
 
 # destroy the database
-mysql $MYSQL_ARGS -e "DROP DATABASE \`$WIZARD_MYSQL_DB\`;"
-mysql $MYSQL_ARGS -e "CREATE DATABASE \`$WIZARD_MYSQL_DB\`;"
+mysql $MYSQL_ARGS -e "DROP DATABASE \``wizard database .`\`;"
+mysql $MYSQL_ARGS -e "CREATE DATABASE \``wizard database .`\`;"
 
 BACKUP=`wizard restore | head -n1`
 wizard restore "$BACKUP"