mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
fd36125a21
commit
ba89ad9b9f
1 changed files with 11 additions and 0 deletions
|
@ -20,6 +20,17 @@ test_expect_success 'Test help.' '
|
||||||
IFS=$save_IFS
|
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.' '
|
test_expect_success 'Test setup-repo and list-repos.' '
|
||||||
SSH_ORIGINAL_COMMAND="setup-repo foobar" AUR_USER=user \
|
SSH_ORIGINAL_COMMAND="setup-repo foobar" AUR_USER=user \
|
||||||
"$GIT_SERVE" 2>&1 &&
|
"$GIT_SERVE" 2>&1 &&
|
||||||
|
|
Loading…
Add table
Reference in a new issue