Debian Codegraph @

debian/tests/install-postgresql

raw
1 #!/bin/sh
2 # Install MediaWiki on the PostgreSQL backend
3 # and then verify the installation was successful.
4 set -e
5
6 mkdir /tmp/mw-install
7 sudo -u postgres createuser --createdb -e wikidebadmin
8 sudo -u postgres psql -c "ALTER USER wikidebadmin WITH PASSWORD 'DebianIsTheBest';"
9 php /var/lib/mediawiki/maintenance/install.php --scriptpath /mediawiki --confpath /tmp/mw-install --dbname autopkgtestwiki --dbtype postgres --dbserver localhost --dbuser wikidebadmin --dbpass DebianIsTheBest --pass DebianIsTheBest Debian-Autopkgtest Administrator
10 sudo cat >> /tmp/mw-install/LocalSettings.php <<EOF
11 \$wgShowExceptionDetails = true;
12 \$wgShowDBErrorBacktrace = true;
13 ini_set( 'max_execution_time', 300 );
14 EOF
15 sudo mv /tmp/mw-install/LocalSettings.php /etc/mediawiki/LocalSettings.php
16
17 if [ -f ./debian/tests/install-thing ]; then
18 ./debian/tests/install-thing
19 fi
20
21 # Force clearing of PHP caches, etc.
22 sudo systemctl restart apache2
23
24 # Run tests
25 ./debian/tests/assert-cli
26 ./debian/tests/assert-http
27 if [ -f ./debian/tests/assert-thing ]; then
28 ./debian/tests/assert-thing
29 fi
30