diff options
Diffstat (limited to 'tests/unp01.at')
-rw-r--r-- | tests/unp01.at | 66 |
1 files changed, 30 insertions, 36 deletions
diff --git a/tests/unp01.at b/tests/unp01.at index ec70ded..5c50a18 100644 --- a/tests/unp01.at +++ b/tests/unp01.at @@ -1,5 +1,5 @@ -# Test legacy upload notification requests -*- Autotest -*- -# Copyright (C) 2020 Sergey Poznyakoff +# 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 @@ -13,54 +13,48 @@ # # 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 successful uploads]) + +AT_SETUP([Multiple uploads to single spool]) AT_KEYWORDS([uploads unp unp01]) AT_WYDAWCA_DAEMON([ -AT_SORT_PREREQ socket=$(pwd)/wydawca.s -uploaddir=$(pwd)/source/ok -GNUPGHOME=$WY_TESTDIR/etc -export socket uploaddir GNUPGHOME +export socket ], -[cat >> wydawca.cf <<EOT +[spool release { + url ftp://wydawca.release; + source "$PWD/upload"; + destination "$PWD/dest"; +} inotify no; listen $socket; -EOT ], -[ -upload() { - name=$1 - shift - echo "$@" > $uploaddir/$name - gpg --batch --no-tty -ba \ - -o $uploaddir/$name.sig $uploaddir/$name - cat > $name.directive <<EOT -version: 1.2 -directory: proj -filename: $name -EOT - gpg --batch --no-tty --clearsign \ - -o $uploaddir/$name.directive.asc $name.directive -} - -upload one "first distro" 2>gpg.err -upload two "second distro" 2>>gpg.err - -wyclt $socket ckok -while ! test -f @CWD@/dest/proj/one && ! test -f @CWD@/dest/proj/one.sig +[], +[mkdir orig +wy_create_upload conversion orig/conversion-1.1.tar +wy_create_upload -l 16400 mugello orig/mugello-1.0.tar +wy_create_upload dogana orig/dogana-1.0.tar +cp orig/* upload +wyclt $socket release +while test -f $PWD/upload/conversion-1.1.tar.directive.asc \ + || test -f $PWD/upload/mugello-1.0.tar.directive.asc \ + || test -f $PWD/upload/dogana-1.0.tar.directive.asc do sleep 1 done ], -[find dest -type f|sort +[while read project file +do + cmp orig/$file dest/$project/$file + cmp orig/$file.sig dest/$project/$file.sig +done <<EOF +conversion conversion-1.1.tar +mugello mugello-1.0.tar +dogana dogana-1.0.tar +EOF ], [0], -[dest/proj/one -dest/proj/one.sig -dest/proj/two -dest/proj/two.sig -], +[], [ignore]) AT_CLEANUP |