aboutsummaryrefslogtreecommitdiff
path: root/tests/mailstats.at
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-19 21:07:28 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-19 21:07:28 +0200
commit62758ace16e756050f15b81e66ee5ab3bdd062ab (patch)
tree5ca9f04bdf00988185e3df1ad2bd21854d27121a /tests/mailstats.at
parent288ad3a8baf196011e791988b3251bbedb5f6cc2 (diff)
downloadwydawca-62758ace16e756050f15b81e66ee5ab3bdd062ab.tar.gz
wydawca-62758ace16e756050f15b81e66ee5ab3bdd062ab.tar.bz2
Improve testsuite
* src/mail.c (mail_send_message): Fix diagnostics. (mail_stats): Bail out if admin_address is not defined. * tests/mailstats.at: New file. * tests/Makefile.am (TESTSUITE_AT): Add mailstats.at * tests/testsuite.at: Add mailstats.at * tests/etc/mailstats.rc: New file. * tests/etc/Makefile.am (EXTRA_DIST): Add missing files. * tests/etc/wydawca.rcin: Define admin-address, enforce newline at EOF. * tests/notify-upl.at, tests/upload-dry.at, tests/upload.at: Fix descriptions.
Diffstat (limited to 'tests/mailstats.at')
-rw-r--r--tests/mailstats.at84
1 files changed, 84 insertions, 0 deletions
diff --git a/tests/mailstats.at b/tests/mailstats.at
new file mode 100644
index 0000000..dc70ff4
--- /dev/null
+++ b/tests/mailstats.at
@@ -0,0 +1,84 @@
+# Check mailing statistics -*- Autotest -*-
+# Copyright (C) 2009 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([Simple upload statistics])
+
+AT_DATA([errtmpl],
+[wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started
+wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite
+wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished
+wydawca: [[INFO]] errors: 0
+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: 1
+wydawca: [[INFO]] files uploaded: 2
+wydawca: [[INFO]] files archived: 0
+wydawca: [[INFO]] symlinks created: 0
+wydawca: [[INFO]] symlinks removed: 0
+])
+
+AT_DATA([expout],
+[-F wydawca-noreply@localhost root@localhost
+=========
+To: root@localhost
+Subject: Wydawca stats
+X-Mailer: AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION)
+
+This is to notify you that the recent run of wydawca
+caused the following results:
+
+errors ............................. 0
+warning ............................ 0
+bad signatures ..................... 0
+access violation attempts .......... 0
+complete triplets .................. 1
+incomplete triplets ................ 0
+bad triplets ....................... 0
+expired triplets ................... 0
+triplet successes .................. 1
+files uploaded ..................... 2
+files archived ..................... 0
+symlinks created ................... 0
+symlinks removed ................... 0
+
+Regards,
+Wydawca
+])
+
+AT_CHECK([
+wydawca_init_testdirs
+wydawca_config wydawca.rc
+cat $WD_CONFSRC/mailstats.rc >> wydawca.rc
+wydawca_upload file file.directive.asc file.sig
+
+wydawca_expandmeta errtmpl experr
+ulimit -c unlimited
+wydawca --no-preproc -c wydawca.rc || exit $?
+wydawca_cmp proj file file.sig
+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.