This repository has been archived by the owner on Jul 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
64 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# A lie, but that shouldn't matter. | ||
language: c | ||
|
||
sudo: true | ||
|
||
# We override what to do anyway. | ||
script: sudo ./test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# Basic installer tests | ||
|
||
set -e | ||
|
||
check_service() { | ||
# Make sure that the wiki is reachable & RESTBase works | ||
curl http://localhost/api/rest_v1/page/html/Main_Page \ | ||
| grep -q "MediaWiki has been successfully installed" | ||
} | ||
|
||
# Make sure the installer does not ask questions | ||
export MEDIAWIKI_DOMAIN=localhost | ||
export AUTO_UPDATE=true | ||
|
||
CHECKOUT=$(pwd) | ||
|
||
cd /tmp | ||
|
||
cat "$CHECKOUT/mediawiki-containers" | bash -s install | ||
|
||
check_service | ||
|
||
# Restart the service | ||
service mediawiki-containers restart | ||
|
||
sleep 10 | ||
|
||
check_service | ||
|
||
# Exercise the automatic updater | ||
/etc/cron.daily/mediawiki-containers | ||
|
||
check_service |