aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-19 02:33:23 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-19 02:33:23 +0200
commit288ad3a8baf196011e791988b3251bbedb5f6cc2 (patch)
tree5215a3a561eec921df9a68c978f56fd0eb9f51ac /tests
parent8c4ab07dbf003ba07bec6e77fd803b9c54b91e52 (diff)
downloadwydawca-288ad3a8baf196011e791988b3251bbedb5f6cc2.tar.gz
wydawca-288ad3a8baf196011e791988b3251bbedb5f6cc2.tar.bz2
Lots of bugfixes + new testsuite
* configure.ac: Disable sendfile by default. * src/builtin.c (builtin_run): Fix value returned of failure. * src/config.c (target_args): Fix ordering * src/meta.c (meta_expand_string): Fix handling of unexpanded macros. * src/triplet.c (fill_user_data): Fix conditional. * src/verify.c (make_default_meta): Fix trailing null. * tests/.gitignore: Add source and dest * tests/Makefile.am (EXTRA_DIST): Add dist. (TESTSUITE_AT): Add new tests. * tests/atlocal.in: Update. * etc/.gitignore: Add wydawca.rc * tests/etc/Makefile.am: Add wydawca.rcin * tests/testsuite.at: Add new tests * tests/dist/file: New file. * tests/dist/file.directive.asc: New file. * tests/dist/file.sig: New file. * tests/etc/notify.rc: New file. * tests/etc/nullmail: New file. * tests/etc/wydawca.rcin: New file. * tests/notify-upl.at: New file. * tests/upload-dry.at: New file. * tests/upload.at: New file.
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore2
-rw-r--r--tests/Makefile.am5
-rw-r--r--tests/atlocal.in44
-rw-r--r--tests/dist/file1
-rw-r--r--tests/dist/file.directive.asc14
-rw-r--r--tests/dist/file.sig7
-rw-r--r--tests/etc/.gitignore1
-rw-r--r--tests/etc/Makefile.am2
-rw-r--r--tests/etc/notify.rc160
-rwxr-xr-xtests/etc/nullmail11
-rw-r--r--tests/etc/wydawca.rcin71
-rw-r--r--tests/notify-upl.at96
-rw-r--r--tests/testsuite.at4
-rw-r--r--tests/upload-dry.at66
-rw-r--r--tests/upload.at54
15 files changed, 535 insertions, 3 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index 93f8f46..5c6ad40 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -4,3 +4,5 @@ package.m4
testsuite
testsuite.dir
testsuite.log
+source
+dest
diff --git a/tests/Makefile.am b/tests/Makefile.am
index dff0097..41b079d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with Wydawca. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
+EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 dist
DISTCLEANFILES = atconfig $(check_SCRIPTS)
MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
SUBDIRS = etc
@@ -41,6 +41,9 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
TESTSUITE_AT = \
testsuite.at\
+ notify-upl.at\
+ upload.at\
+ upload-dry.at\
version.at
TESTSUITE = $(srcdir)/testsuite
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 898005b..9205ae4 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -7,3 +7,47 @@ PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdi
XFAILFILE=$abs_builddir/.badversion
trap "cleanup; test -r $XFAILFILE && cat $XFAILFILE; exit $?" 1 2 13 15
+
+WD_CONFSRC=@abs_top_srcdir@/tests/etc
+WD_DISTDIR=@abs_top_srcdir@/tests/dist
+WD_SRC=@abs_top_builddir@/tests/source
+WD_DST=@abs_top_builddir@/tests/dest
+
+wydawca_init_testdirs() {
+ for dir in "$WD_SRC" "$WD_DST"
+ do
+ if test -d "$dir"; then
+ rm -rf "$dir"/*
+ else
+ mkdir "$dir"
+ fi
+ done
+}
+
+wydawca_clean_testdirs() {
+ rm -rf "$WD_SRC" "$WD_DST"
+}
+
+wydawca_expandmeta() {
+ sed "s/@USER@/$USER/g;s,@WD_SRC@,$WD_SRC,g;s,@WD_DST@,$WD_DST,g;s,@WD_CONFSRC@,$WD_CONFSRC,g" $1 > $2
+}
+
+wydawca_config() {
+ wydawca_expandmeta $WD_CONFSRC/${1}in $1
+}
+
+wydawca_upload() {
+ for file in $@
+ do
+ cp "$WD_DISTDIR/$file" "$WD_SRC"
+ done
+}
+
+wydawca_cmp() {
+ p=$1
+ shift
+ for file in $@
+ do
+ cmp "$WD_DISTDIR/$file" "$WD_DST/$p/$file" || exit 1
+ done
+}
diff --git a/tests/dist/file b/tests/dist/file
new file mode 100644
index 0000000..2635c5c
--- /dev/null
+++ b/tests/dist/file
@@ -0,0 +1 @@
+This is a test file for Wydawca testsuite.
diff --git a/tests/dist/file.directive.asc b/tests/dist/file.directive.asc
new file mode 100644
index 0000000..0f40f6f
--- /dev/null
+++ b/tests/dist/file.directive.asc
@@ -0,0 +1,14 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+version: 1.1
+directory: proj
+comment: Gnupload for Wydawca testsuite
+filename: file
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.7 (GNU/Linux)
+
+iD8DBQFJnExlCZA3/2YT9iMRAgm7AJ9SLO/vihu3PeAwyRQsJp85NVC9swCdE+FQ
+SF9/JnHygja6qb5KRZEleuw=
+=RjYY
+-----END PGP SIGNATURE-----
diff --git a/tests/dist/file.sig b/tests/dist/file.sig
new file mode 100644
index 0000000..31cdef1
--- /dev/null
+++ b/tests/dist/file.sig
@@ -0,0 +1,7 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.7 (GNU/Linux)
+
+iD8DBQBJnExlCZA3/2YT9iMRAjDIAKCSt2MbRo8g9P9y/u9WZp1tGlVShwCeI7K+
+3G2UCTc/xlj200mHP2+B84M=
+=UO+/
+-----END PGP SIGNATURE-----
diff --git a/tests/etc/.gitignore b/tests/etc/.gitignore
index 8f61f97..fd62865 100644
--- a/tests/etc/.gitignore
+++ b/tests/etc/.gitignore
@@ -1,2 +1,3 @@
*.gpg
random_seed
+wydawca.rc
diff --git a/tests/etc/Makefile.am b/tests/etc/Makefile.am
index af7b28e..267beef 100644
--- a/tests/etc/Makefile.am
+++ b/tests/etc/Makefile.am
@@ -17,7 +17,7 @@
GPGFILES = secring.gpg pubring.gpg
noinst_DATA = @WYDAWCA_GPGFILES@
-EXTRA_DIST = pubring.asc secring.asc
+EXTRA_DIST = pubring.asc secring.asc wydawca.rcin
GPG_FLAGS = --quiet --no-permission-warning --homedir .
pubring.gpg secring.gpg: $(srcdir)/pubring.asc $(srcdir)/secring.asc
diff --git a/tests/etc/notify.rc b/tests/etc/notify.rc
new file mode 100644
index 0000000..00c6bda
--- /dev/null
+++ b/tests/etc/notify.rc
@@ -0,0 +1,160 @@
+# Notify the user about successful uploads
+notify-event {
+ event success;
+ recipient user;
+ message <<EOT
+Subject: Upload of ${project} successful
+
+Upload of ${project} to ${url}/${dir} finished successfully.
+Files uploaded:
+
+${triplet:upload}
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify project admin about a successful upload.
+notify-event {
+ event success;
+ recipient owner;
+ message <<EOT
+Subject: Upload of ${project} successful
+
+${user:real-name} (${user:email}) successfully uploaded files
+for ${project} to ${url}/${dir}. Files uploaded:
+
+${triplet:upload}
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify project admin, if someone non authorized attempted to upload some
+# files for the project they run.
+notify-event {
+ event bad-ownership;
+ recipient owner;
+ message <<EOT
+Subject: Suspicious upload of ${project}
+
+Someone not authorized to make releases for ${project}
+has attempted to upload the following files to ${url}/${dir}:
+
+${triplet:full}
+
+This upload has been ignored and the files removed. The person who attempted
+the upload was ${user:real-name}, user name ${user:name}, email ${user:email}.
+If you think this is an error and wish this user to be authorized to make
+releases for ${project}, please contact <puszcza-hackers@gnu.org.ua>.
+Otherwise, let us know so we could undertake appropriate measures.
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify the user (submitter), if the directive signature does not match
+# his record.
+# It may be a good idea not to notify users about such events, just to
+# stay on a safe side. Notifying project admins (see below) should be quite
+# enough.
+notify-event {
+ event bad-directive-signature;
+ recipient user;
+ message <<EOT
+Subject: Suspicious upload of ${project}
+
+Someone (apparently you), has tried to make a release for ${project}.
+However, the signature of the directive file was wrong, which looks
+suspicious. The person uploaded the following files:
+
+${triplet:full}
+
+This upload has been ignored and the files removed. If it was you who
+attempted this upload, please make sure you use the right PGP key and
+try again. If not, please let us know as soon as possible, so we can
+track down the person trying to make believe he is you.
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify the project admin, if submitted directive signature did not match
+# submitter record.
+notify-event {
+ event bad-directive-signature;
+ recipient owner;
+ message <<EOT
+Subject: Suspicious upload of ${project}
+
+${user:real-name} (${user:email}) has tried to make a release
+for ${project}. However, the signature of the directive file was wrong,
+which looks suspicious. The person uploaded the following files:
+
+${triplet:full}
+
+This upload has been ignored and the files removed.
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify the user (submitter), if the detached signature does not match
+# his record.
+# It may be a good idea not to notify users about such events, just to
+# stay on a safe side. Notifying project admins (see below) should be quite
+# enough.
+notify-event {
+ event bad-detached-signature;
+ recipient user;
+ message <<EOT
+Subject: Suspicious upload of ${project}
+
+Someone (apparently you), has tried to make a release for ${project}.
+However, the detached signature signature was wrong, which looks
+suspicious. The person uploaded the following files:
+
+${triplet:full}
+
+This upload has been ignored and the files removed. If it was you who
+attempted this upload, please make sure you use the right PGP key and
+try again. If not, please let us know as soon as possible, so we can
+track down the person trying to make believe he is you.
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+# Notify the project admin, if submitted detached signature did not match
+# submitter record.
+notify-event {
+ event bad-detached-signature;
+ recipient owner;
+ message <<EOT
+Subject: Suspicious upload of ${project}
+
+${user:real-name} (${user:email}) has tried to make a release
+for ${project}. However, the detached signature file was wrong,
+which looks suspicious. The person uploaded the following files:
+
+${triplet:full}
+
+This upload has been ignored and the files removed.
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
diff --git a/tests/etc/nullmail b/tests/etc/nullmail
new file mode 100755
index 0000000..55220a6
--- /dev/null
+++ b/tests/etc/nullmail
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+out=${1:-/dev/null}
+shift
+
+echo $* >> $out
+echo "=========" >> $out
+cat - >> $out
+echo "========="
+echo ""
+exit 0 \ No newline at end of file
diff --git a/tests/etc/wydawca.rcin b/tests/etc/wydawca.rcin
new file mode 100644
index 0000000..f8a8ce4
--- /dev/null
+++ b/tests/etc/wydawca.rcin
@@ -0,0 +1,71 @@
+statistics all;
+
+umask 022;
+
+access-method project-owner {
+ type builtin;
+ query "${project}";
+ params ("/exact",
+ "proj", "proj-owner@localhost", "Project Admin");
+}
+
+access-method user-data {
+ type builtin;
+ query "${user}";
+ params ("/exact",
+ "@USER@", "@USER@@localhost", "Wydawca Test User");
+}
+
+access-method verify-user {
+ type builtin;
+ query "${user}";
+ params ("/exact",
+ "@USER@", "@USER@");
+}
+
+access-method gpg-key {
+ type builtin;
+ query "${user}";
+ params ("/exact",
+ "@USER@",
+"-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
+"Version: GnuPG v1.4.7 (GNU/Linux)\n"
+"\n"
+"mQGhBEmZcTERBAD9sD9d3xhVHURwbLcHUHIK6LGSHAlFzKv4MSOk+6nJhdvbQfIV\n"
+"YAe6VZ8fTX8EX7f0Vw53or1mlBOZpMNeEHp/IejFwnT3pAF3xiHTwbmwJg+0RuKo\n"
+"dwfN0vO9xECj3/ZsBvSYbYty8Vmy2e8osrNdXAXd+8Z3xJ3reAWOujGj9wCg1qg5\n"
+"1LJgEIbPdZm0Iv43Pvdzbi8EAMlW6oZuBFuQXf0e2NceZKrZvGjFDWLgIgHvLmXb\n"
+"0d+7kmLgCwJ2J7byOAnKQ8eu/1+V3WYvYd6Scut3809J8Cx5KhEbwuZLx/V4yUUW\n"
+"S2SjFV4i+5qqvPwrgGezd5Cus5qxkOabXitG8EccQe0k8lhiRKLgt6zBftC+MgDX\n"
+"o4NwA/UZqm58F4jLuVDHbnz9Jv5/jfyduzg6UwGgU+IdE9eBpmzmVGdgVQixGFRW\n"
+"hIiDdCo6y4yvljBy6jaZVuwDc8jrVQDo8bo3EWkkcajXT+BVCpkSJAPLfDnKXJW0\n"
+"jXM9X/zNiZBNoEyx/qRUEvHO1irSffSZ1kiJMMGRaNN7T7jMtCxXeWRhd2NhIChU\n"
+"ZXN0c3VpdGUpIDxidWctd3lkYXdjYUBnbnUub3JnLnVhPohgBBMRAgAgBQJJmXEx\n"
+"AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCZA3/2YT9iMLKQCgwpamuefh\n"
+"VAluEw4g+ym1sVi5nxsAn3X1MBePRzYgkJX7vloEwKql63FfuQINBEmZcTEQCACI\n"
+"jtyYxEdnXUHwLdQwkvlP7lBsTNn+ofO6Kyf7qMF+dY4PeE/IyO9orcj04iUZ038V\n"
+"8WpP1dWkiqXhxN/MQdPNKDcXGbOqtGz8FmsoHlS8lqRO0Tgz44K6hejHHx2gduZe\n"
+"uiKCbKjy12lpL5QmRO98Dk9h5M3uRQ8SoKVLzd93TFStDHrlFmialzWFLRidS9fB\n"
+"SXmlGQleNS3+WIL8YXr5t4oHIOL9Lq8ZOES4QtZ/vf0DSgJX9eR2vgCeevFlJmAt\n"
+"+8psU+cFCzxNb4gHsHcOTqR4H/aXnQp2g+q3pJaev41/V3oVc0ANKQbUV/0SLTK8\n"
+"2Ns7Z1+kV/tzsfA1vVmDAAMGB/49jdR1WSY1dX2aA3Ez3jd9EZL3qgYtsjPt2ZgY\n"
+"ySFI0gDSniKYayUoDTC7dQ3GYiKhhupiFeIgEbGkKyGZIWbZCFwkqJOzdPWgPRNg\n"
+"JXB9hKRGwViZVbvAhcHec83IqGjrndt3oQnlfMrLNR12KWsOpQRYJ8F4CMSNSsQx\n"
+"JsjkjStgy/A1zbzkVlgf50lY5sltcWuOYU66lqq63QlK+uwNt1bqIS62fvDNeQK6\n"
+"P2O3QX5lg75nEzdUmHyP+yTlSjHTPf7qaRx9UPpnf7r9t/IcjkXAMu6Y2LMgfbTA\n"
+"qVoOxiH7h8CeNXaVg8QF2cHGdwGLDvZ3X+Vtck/LjjdmHxiiiEkEGBECAAkFAkmZ\n"
+"cTECGwwACgkQCZA3/2YT9iOTCwCeNckYjNiatFHHlOqph3N5hYmix6MAnRPeCkG4\n"
+"BBXnlxcgH/vqaSpx7Fgr\n"
+"=gYgX\n"
+"-----END PGP PUBLIC KEY BLOCK-----\n");
+}
+
+directory ftp://wydawca.test {
+ source "@WD_SRC@";
+ destination "@WD_DST@";
+ archive none;
+}
+
+from-address "wydawca-noreply@localhost";
+
+mailer "| @WD_CONFSRC@/nullmail @WD_DST@/mail.out -F ${sender} ${rcpt}"; \ No newline at end of file
diff --git a/tests/notify-upl.at b/tests/notify-upl.at
new file mode 100644
index 0000000..bac8755
--- /dev/null
+++ b/tests/notify-upl.at
@@ -0,0 +1,96 @@
+# Checking wydawca version -*- 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 and notification])
+
+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([outtmpl],
+[-F wydawca-noreply@localhost proj-owner@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
+=========
+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([
+wydawca_init_testdirs
+wydawca_config wydawca.rc
+cat $WD_CONFSRC/notify.rc >> wydawca.rc
+wydawca_upload file file.directive.asc file.sig
+
+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 $WD_DST/mail.out | sed -f ls.sed
+],
+[0],
+[expout],
+[experr])
+
+wydawca_clean_testdirs
+
+AT_CLEANUP
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 5dc1661..bc234f0 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -22,4 +22,6 @@ m4_define([AT_SKIP_TEST],[exit 77])
AT_INIT
AT_TESTED([wydawca])
m4_include([version.at])
-
+m4_include([upload-dry.at])
+m4_include([upload.at])
+m4_include([notify-upl.at]) \ No newline at end of file
diff --git a/tests/upload-dry.at b/tests/upload-dry.at
new file mode 100644
index 0000000..aba95d0
--- /dev/null
+++ b/tests/upload-dry.at
@@ -0,0 +1,66 @@
+# Checking wydawca version -*- 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([Dry-run upload])
+
+AT_DATA([template],
+[wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started
+wydawca: [[DEBUG]] @WD_SRC@ -> @WD_DST@
+wydawca: [[DEBUG]] file file is a distributive, root file
+wydawca: [[DEBUG]] file file.directive.asc is a signed upload directive, root file
+wydawca: [[DEBUG]] file file.sig is a detached signature, root file
+wydawca: [[DEBUG]] Processing files for @WD_DST@
+wydawca: [[DEBUG]] FILE file, DIST=file, SIG=file.sig, DIRECTIVE=file.directive.asc
+wydawca: [[NOTICE]] Good signature from Wydawca (Testsuite) <bug-wydawca@gnu.org.ua>
+wydawca: [[DEBUG]] file: directive file signature OK
+wydawca: [[DEBUG]] verifying access rights for user gray to project proj
+wydawca: [[DEBUG]] Processing triplet `file'
+wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite
+wydawca: [[DEBUG]] good detached signature for file
+wydawca: [[DEBUG]] installing file to @WD_DST@/proj
+wydawca: [[DEBUG]] installing file.sig to @WD_DST@/proj
+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_CHECK([
+wydawca_init_testdirs
+wydawca_config wydawca.rc
+wydawca_upload file file.directive.asc file.sig
+
+wydawca_expandmeta template experr
+
+wydawca --no-preproc --dry-run -c wydawca.rc
+],
+[0],
+[],
+[experr])
+
+wydawca_clean_testdirs
+
+AT_CLEANUP
diff --git a/tests/upload.at b/tests/upload.at
new file mode 100644
index 0000000..a9b6e6b
--- /dev/null
+++ b/tests/upload.at
@@ -0,0 +1,54 @@
+# Checking wydawca version -*- 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])
+
+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: [[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_CHECK([
+wydawca_init_testdirs
+wydawca_config wydawca.rc
+wydawca_upload file file.directive.asc file.sig
+
+wydawca_expandmeta template experr
+
+wydawca --no-preproc -c wydawca.rc || exit $?
+wydawca_cmp proj file file.sig
+],
+[0],
+[],
+[experr])
+
+wydawca_clean_testdirs
+
+AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.