]> scripts.mit.edu Git - wizard.git/blob - tests/mediawiki-continue-upgrade-test.sh
Move wizard.scripts module to plugins, added hooks accordingly.
[wizard.git] / tests / mediawiki-continue-upgrade-test.sh
1 #!/bin/bash -e
2 cd `dirname $0`
3
4 TESTNAME="mediawiki_continue_upgrade"
5 source ./setup
6
7 source ./mediawiki-install
8
9 # nuke the install
10 FROB="RELEASE-NOTES"
11 mv "$TESTDIR/$FROB" "$TESTDIR/$FROB.bak"
12 echo "this is a bad file" > "$TESTDIR/$FROB"
13
14 # attempt an upgrade, this will fail
15 RESULT=`! wizard upgrade "$TESTDIR" --non-interactive`
16 TMPTESTDIR=`echo "$RESULT" | awk '{print $2}'`
17
18 # resolve the upgrade
19 mv -f "$TESTDIR/$FROB.bak" "$TMPTESTDIR/$FROB"
20 OLDDIR=`pwd`
21 cd "$TMPTESTDIR"
22 git add $FROB
23 git commit -m "resolution commit"
24 wizard upgrade --continue