summaryrefslogtreecommitdiffabout
path: root/tests/notify-upl.at
blob: 3ace508e3690b321d6f949938187e9754d0a75f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Check success notifications                              -*- Autotest -*-
# Copyright (C) 2009-2012, 2017 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 and notification])
AT_KEYWORDS([notify notify-upl])

AT_DATA([errtmpl],
[wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started
wydawca: [[NOTICE]] file.directive.asc: VERSION: 1.1
wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite
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
wydawca: [[INFO]] check failures: 0
wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished
])

AT_DATA([outtmpl],
[-F wydawca-noreply@localhost proj-owner@localhost
=========
From: wydawca-noreply@localhost
To: "Project Admin" <proj-owner@localhost>
Subject: Upload of proj successful
X-Mailer: AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION)

Wydawca Test User (@USER@@localhost) successfully uploaded files
for proj to ftp://wydawca.test/proj. Files uploaded:

listing of file
listing of file.sig

Regards,
Wydawca
The Project Submission Robot
-F wydawca-noreply@localhost @USER@@localhost
=========
From: wydawca-noreply@localhost
To: "Wydawca Test User" <@USER@@localhost>
Subject: Upload of proj successful
X-Mailer: AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION)

Upload of proj to ftp://wydawca.test/proj finished successfully.
Files uploaded:

listing of file
listing of file.sig

Regards,
Wydawca
The Project Submission Robot
])

AT_DATA([ls.sin],
[s,^-[[rwx-]]\{9\} @USER@.*file$,listing of file,
s,^-[[rwx-]]\{9\} @USER@.*file.sig$,listing of file.sig,
])

AT_CHECK([
AT_MAILUTILS_PREREQ
wydawca_init_testdirs
wydawca_config wydawca.rc
mv wydawca.rc simple.rc
wydawca_config notify.rc
cat notify.rc simple.rc >> wydawca.rc
wydawca_upload test file

wydawca_expandmeta errtmpl experr
wydawca_expandmeta outtmpl expout
wydawca_expandmeta ls.sin ls.sed

wydawca --no-preproc -c wydawca.rc || exit $?
wydawca_cmp proj file file.sig
cat $WY_DST/mail.out | sed -f ls.sed
],
[0],
[expout],
[experr])

wydawca_clean_testdirs

AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.