diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2016-12-20 18:02:55 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2016-12-20 18:04:46 +0100 |
commit | ba89ad9b9f8b141683d7e661d951ae304cedf692 (patch) | |
tree | f58f0dc28baea24bc6c167f37f95b7ff8fc081c9 /test | |
parent | fd36125a21ad6e4d665e1b2f4db784b073846d94 (diff) | |
download | aur-ba89ad9b9f8b141683d7e661d951ae304cedf692.tar.gz aur-ba89ad9b9f8b141683d7e661d951ae304cedf692.tar.xz |
t1200: Test maintenance mode
Add a test case to ensure that enabling the maintenance mode disables
the SSH interface.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'test')
-rwxr-xr-x | test/t1200-git-serve.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/t1200-git-serve.sh b/test/t1200-git-serve.sh index 5054ce36..6fa6f957 100755 --- a/test/t1200-git-serve.sh +++ b/test/t1200-git-serve.sh @@ -20,6 +20,17 @@ test_expect_success 'Test help.' ' IFS=$save_IFS ' +test_expect_success 'Test maintenance mode.' ' + mv config config.old && + sed "s/^\(enable-maintenance = \)0$/\\11/" config.old >config && + SSH_ORIGINAL_COMMAND=help test_must_fail "$GIT_SERVE" 2>actual && + cat >expected <<-EOF && + The AUR is down due to maintenance. We will be back soon. + EOF + test_cmp expected actual && + mv config.old config +' + test_expect_success 'Test setup-repo and list-repos.' ' SSH_ORIGINAL_COMMAND="setup-repo foobar" AUR_USER=user \ "$GIT_SERVE" 2>&1 && |