From d568b8aeb0be95d6a1da7da0434de23e6b2260e2 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 23 Mar 2011 19:50:56 +0100 Subject: Add support for packages which use the epoch variable --- test/test.d/ftpdir-cleanup.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/test.d/ftpdir-cleanup.sh') diff --git a/test/test.d/ftpdir-cleanup.sh b/test/test.d/ftpdir-cleanup.sh index e9b977b..17287f5 100755 --- a/test/test.d/ftpdir-cleanup.sh +++ b/test/test.d/ftpdir-cleanup.sh @@ -34,6 +34,34 @@ testCleanupSimplePackages() { done } +testCleanupEpochPackages() { + local arches=('i686' 'x86_64') + local pkgs=('pkg-simple-epoch') + local pkgbase + local arch + + for pkgbase in ${pkgs[@]}; do + for arch in ${arches[@]}; do + releasePackage extra ${pkgbase} ${arch} + done + done + + ../db-update + + for arch in ${arches[@]}; do + ../db-remove pkg-simple-epoch extra ${arch} + done + + ../cron-jobs/ftpdir-cleanup >/dev/null + + for arch in ${arches[@]}; do + local pkg1="pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz" + checkRemovedPackage extra 'pkg-simple-epoch' ${arch} + [ -f "${FTP_BASE}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found" + [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found" + done +} + testCleanupAnyPackages() { local pkgs=('pkg-any-a' 'pkg-any-b') local pkgbase -- cgit v1.2.3-2-g168b