Verified Commit e29af7f8 authored by Morten Linderud's avatar Morten Linderud 🏄
Browse files

test/cases/ftpdir-cleanup: Add debug package test case



We expand the internal __checkRepoRemovedPackage function with globfile
lookups towards DEBUGPKGPOOL and the debug repository. This ensures we
should get a hit for the relevant debug packages.
Signed-off-by: Morten Linderud's avatarMorten Linderud <morten@linderud.pw>
parent a8f8ee96
......@@ -16,9 +16,15 @@ __checkRepoRemovedPackage() {
if __isGlobfile "${FTP_BASE}/${PKGPOOL}/${pkgname}"-*"${PKGEXT}"; then
return 1
fi
if __isGlobfile "${FTP_BASE}/${DEBUGPKGPOOL}/${pkgname}"-debug-*"${PKGEXT}"; then
return 1
fi
if __isGlobfile "${FTP_BASE}/${repo}/os/${repoarch}/${pkgname}"-*"${PKGEXT}"; then
return 1
fi
if __isGlobfile "${FTP_BASE}/${repo}-debug/os/${repoarch}/${pkgname}"-debug-*"${PKGEXT}"; then
return 1
fi
done
}
......@@ -48,6 +54,33 @@ __checkRepoRemovedPackage() {
checkPackage extra pkg-simple-b 1-1
}
@test "cleanup debug packages" {
local arches=('i686' 'x86_64')
local pkgs=('pkg-debuginfo-a' 'pkg-debuginfo-b')
local pkgbase
local arch
for pkgbase in ${pkgs[@]}; do
releasePackage extra ${pkgbase}
done
db-update
for arch in ${arches[@]}; do
db-remove extra ${arch} "${pkgs[0]}"
done
ftpdir-cleanup
checkRemovedPackage extra "${pkgs[0]}"
checkRemovedPackage extra-debug "${pkgs[0]}"
for arch in ${arches[@]}; do
__checkRepoRemovedPackage extra "${pkgs[0]}" ${arch}
done
checkPackage extra "${pkgs[1]}" 1-1
checkPackage extra-debug "${pkgs[1]}" 1-1
}
@test "cleanup epoch packages" {
local arches=('i686' 'x86_64')
local pkgs=('pkg-simple-epoch')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment