summaryrefslogtreecommitdiff
path: root/test/test.d/ftpdir-cleanup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.d/ftpdir-cleanup.sh')
-rwxr-xr-xtest/test.d/ftpdir-cleanup.sh32
1 files changed, 30 insertions, 2 deletions
diff --git a/test/test.d/ftpdir-cleanup.sh b/test/test.d/ftpdir-cleanup.sh
index e9b977b..77b02b8 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
@@ -78,13 +106,13 @@ testCleanupSplitPackages() {
../cron-jobs/ftpdir-cleanup >/dev/null
for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/${pkgs[0]}"/*-${arch}.pkg.tar.*; do
+ for pkg in "${pkgdir}/${pkgs[0]}"/*-${arch}${PKGEXT}; do
checkRemovedPackage extra ${pkgs[0]} ${arch}
[ -f "${FTP_BASE}/${PKGPOOL}/${pkg}" ] && fail "${PKGPOOL}/${pkg} found"
[ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg}" ] && fail "${repo}/os/${arch}/${pkg} found"
done
- for pkg in "${pkgdir}/${pkgs[1]}"/*-${arch}.pkg.tar.*; do
+ for pkg in "${pkgdir}/${pkgs[1]}"/*-${arch}${PKGEXT}; do
checkPackage extra $(basename ${pkg}) ${arch}
done
done