aboutsummaryrefslogtreecommitdiff
path: root/tests/check-notify.at
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-01-02 18:50:14 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-01-02 18:50:14 +0200
commit1b0a4de9fa73dd2453cbd2902c2cd4d000f4abe7 (patch)
tree061ee328e2464d5bed9f5882642fbc25d32de8bc /tests/check-notify.at
parenta510f517e1aff073e6b37a5fa9e8ed825de836af (diff)
downloadwydawca-1b0a4de9fa73dd2453cbd2902c2cd4d000f4abe7.tar.gz
wydawca-1b0a4de9fa73dd2453cbd2902c2cd4d000f4abe7.tar.bz2
Add testcases for distribution tarball checking.
* src/directive.c (run_check_script): Reword diagnostic messages. * tests/check-fail.at: New testcase. * tests/check-notify.at: New testcase. * tests/check-ok.at: New testcase. * tests/Makefile.am: Add new files. * tests/testsuite.at: Include new tests. * tests/atlocal.in (wydawca_init_testdirs): Create three source subdirectories. (wydawca_upload): Treat first argument as the name of a source subdirectory. * tests/etc/notify.rc: Add check-failure notification. * tests/etc/wydawca.rcin (ckfail, ckok): New spools. * tests/mailstats.at, tests/notify-upl.at, tests/upload.at: Update. * tests/upload-dry.at: Update output template.
Diffstat (limited to 'tests/check-notify.at')
-rw-r--r--tests/check-notify.at86
1 files changed, 86 insertions, 0 deletions
diff --git a/tests/check-notify.at b/tests/check-notify.at
new file mode 100644
index 0000000..16ae296
--- /dev/null
+++ b/tests/check-notify.at
@@ -0,0 +1,86 @@
+# Check distribution verification tests - failure notification -*- Autotest -*-
+# Copyright (C) 2010 Sergey Poznyakoff
+#
+# Wydawca is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Wydawca is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Wydawca. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([Verification test failure notification])
+AT_KEYWORDS([uploads check-test check-fail check-fail-notify notify])
+
+AT_DATA([template],
+[wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started
+wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite
+wydawca: [[ERR]] spool check script for file@ckfail returned 1
+wydawca: [[INFO]] errors: 1
+wydawca: [[INFO]] warnings: 0
+wydawca: [[INFO]] bad signatures: 0
+wydawca: [[INFO]] access violation attempts: 0
+wydawca: [[INFO]] complete triplets: 1
+wydawca: [[INFO]] incomplete triplets: 0
+wydawca: [[INFO]] bad triplets: 0
+wydawca: [[INFO]] expired triplets: 0
+wydawca: [[INFO]] triplet successes: 0
+wydawca: [[INFO]] files uploaded: 0
+wydawca: [[INFO]] files archived: 0
+wydawca: [[INFO]] symlinks created: 0
+wydawca: [[INFO]] symlinks removed: 0
+wydawca: [[INFO]] check failures: 1
+wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished
+])
+
+AT_DATA([outtmpl],
+[-F wydawca-noreply@localhost @USER@@localhost
+=========
+From: wydawca-noreply@localhost
+To: "Wydawca Test User" <@USER@@localhost>
+Subject: file rejected
+X-Mailer: AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION)
+
+Your upload of file has been rejected by the distribution
+verification procedure with the following diagnostics:
+
+WYDAWCA_SPOOL=ckfail
+WYDAWCA_SOURCE=@WD_SRC@/fail
+WYDAWCA_DEST=@WD_DST@
+WYDAWCA_URL=ftp://wydawca.ckfail
+WYDAWCA_TRIPLET_BASE=file
+WYDAWCA_DIST_FILE=file
+
+Please fix the tarball and resubmit.
+
+Regards,
+Wydawca
+The Project Submission Robot
+])
+
+AT_CHECK([
+wydawca_init_testdirs
+wydawca_config wydawca.rc
+mv wydawca.rc simple.rc
+cat $WD_CONFSRC/notify.rc simple.rc > wydawca.rc
+
+wydawca_upload fail file file.directive.asc file.sig
+
+wydawca_expandmeta outtmpl expout
+wydawca_expandmeta template experr
+
+wydawca --no-preproc -c wydawca.rc || exit $?
+cat $WD_DST/mail.out
+],
+[0],
+[expout],
+[experr])
+
+wydawca_clean_testdirs
+
+AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.