]> scripts.mit.edu Git - wizard.git/blob - tests/mediawiki-backup-restore-test.sh
Make phpBB installer more friendly for restricted envs.
[wizard.git] / tests / mediawiki-backup-restore-test.sh
1 #!/bin/bash -e
2
3 TESTNAME="mediawiki_backup_restore"
4 source ./setup
5
6 source ./mediawiki-install
7 cd "$TESTDIR"
8 wizard backup
9
10 # destroy some files
11 FROB="includes/Setup.php"
12 mv "$FROB" "$FROB.bak"
13 echo "BOOM" > "$FROB"
14
15 # destroy the database
16 mysql $MYSQL_ARGS -e "DROP DATABASE \``wizard database .`\`;"
17 mysql $MYSQL_ARGS -e "CREATE DATABASE \``wizard database .`\`;"
18
19 BACKUP=`wizard restore | head -n1`
20 wizard restore "$BACKUP"
21
22 cmp "$FROB" "$FROB.bak"
23 curl -s -L "http://$WIZARD_WEB_HOST$WIZARD_WEB_PATH/index.php" | grep "<title>"
24