diff options
Diffstat (limited to 'tests/unp02.at')
-rw-r--r-- | tests/unp02.at | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/tests/unp02.at b/tests/unp02.at new file mode 100644 index 0000000..cf693a7 --- /dev/null +++ b/tests/unp02.at @@ -0,0 +1,73 @@ +# Check legacy upload notification protocol -*- Autotest -*- +# Copyright (C) 2010-2012, 2017, 2019-2020 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([Multiple uploads to all spools]) +AT_KEYWORDS([uploads unp unp02]) + +AT_WYDAWCA_DAEMON([ +socket=$(pwd)/wydawca.s +export socket +], +[spool release { + url ftp://wydawca.release; + source "$PWD/upload/release"; + destination "$PWD/dest/release"; +} +spool alpha { + url ftp://wydawca.alpha; + source "$PWD/upload/alpha"; + destination "$PWD/dest/alpha"; +} +all-spools (all); +inotify no; +listen $socket; +], +[], +[mkdir orig +mkdir orig/release orig/alpha +wy_create_upload conversion orig/release/conversion-1.1.tar +wy_create_upload -l 16400 mugello orig/release/muguello-1.0.tar +wy_create_upload mugello orig/alpha/muguello-1.0.90.tar +wy_create_upload dogana orig/release/dogana-1.0.tar +wy_create_upload -l 86400 falcon orig/alpha/falcon-0.99.tar +cp -a orig/* upload +wyclt $socket all +while test -f $PWD/upload/release/conversion-1.1.tar.directive.asc \ + || test -f $PWD/upload/release/muguello-1.0.tar.directive.asc \ + || test -f $PWD/upload/alpha/muguello-1.0.90.tar.directive.asc \ + || test -f $PWD/upload/release/dogana-1.0.tar.directive.asc \ + || test -f $PWD/upload/alpha/falcon-0.99.tar.directive.asc +do + sleep 1 +done +], +[while read distro project file +do + cmp orig/$distro/$file dest/$distro/$project/$file + cmp orig/$distro/$file.sig dest/$distro/$project/$file.sig +done <<EOF +release conversion conversion-1.1.tar +release mugello muguello-1.0.tar +release dogana dogana-1.0.tar +alpha mugello muguello-1.0.90.tar +alpha falcon falcon-0.99.tar +EOF +], +[0], +[], +[ignore]) + +AT_CLEANUP |