summaryrefslogtreecommitdiff
path: root/test/setup.sh
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2016-09-29 20:45:58 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2016-09-29 22:07:24 +0200
commiteb367d97e28d157036c1bf4f1ee65b0d17d756ea (patch)
treecf087a8a9aaa3a9cb534489ed05132409162db78 /test/setup.sh
parente1709e98ce623aee8062e98a859bcb43553e2faf (diff)
Use the notify script in tests
Instead of only checking whether the notification script is called with the correct parameters, actually invoke the real notify script and check whether proper notifications are generated. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'test/setup.sh')
-rw-r--r--test/setup.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/setup.sh b/test/setup.sh
index e379ada..cd42479 100644
--- a/test/setup.sh
+++ b/test/setup.sh
@@ -15,6 +15,7 @@ MKPKGLISTS="$TOPLEVEL/scripts/mkpkglists.py"
TUVOTEREMINDER="$TOPLEVEL/scripts/tuvotereminder.py"
PKGMAINT="$TOPLEVEL/scripts/pkgmaint.py"
AURBLUP="$TOPLEVEL/scripts/aurblup.py"
+NOTIFY="$TOPLEVEL/scripts/notify.py"
# Create the configuration file and a dummy notification script.
cat >config <<-EOF
@@ -23,11 +24,16 @@ backend = sqlite
name = aur.db
[options]
+aur_location = https://aur.archlinux.org
+aur_request_ml = aur-requests@archlinux.org
enable-maintenance = 0
maintenance-exceptions = 127.0.0.1
[notifications]
-notify-cmd = ./notify.sh
+notify-cmd = $NOTIFY
+sendmail = ./sendmail.sh
+sender = notify@aur.archlinux.org
+reply-to = noreply@aur.archlinux.org
[auth]
valid-keytypes = ssh-rsa ssh-dss ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 ssh-ed25519
@@ -55,11 +61,11 @@ packagesfile = packages.gz
pkgbasefile = pkgbase.gz
EOF
-cat >notify.sh <<-\EOF
+cat >sendmail.sh <<-\EOF
#!/bin/sh
-echo $* >>notify.out
+cat >>sendmail.out
EOF
-chmod +x notify.sh
+chmod +x sendmail.sh
cat >git-shell.sh <<-\EOF
#!/bin/sh