summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/test.d/db-update.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/test.d/db-update.sh b/test/test.d/db-update.sh
index ad0be32..5a3d01d 100755
--- a/test/test.d/db-update.sh
+++ b/test/test.d/db-update.sh
@@ -108,6 +108,15 @@ testUpdateAnyPackageToDifferentRepositoriesAtOnce() {
rm -f "${pkgdir}/pkg-any-a/pkg-any-a-1-2-any.pkg.tar.xz"
}
+testUpdateSameAnyPackageToSameRepository() {
+ releasePackage extra pkg-any-a any
+ ../db-update
+ checkAnyPackage extra pkg-any-a-1-1-any.pkg.tar.xz any
+
+ releasePackage extra pkg-any-a any
+ ../db-update >/dev/null 2>&1 && (fail 'Adding an existing package to the same repository should fail'; return 1)
+}
+
testUpdateSameAnyPackageToDifferentRepositories() {
releasePackage extra pkg-any-a any
../db-update
@@ -118,9 +127,9 @@ testUpdateSameAnyPackageToDifferentRepositories() {
local arch
for arch in i686 x86_64; do
- ( [ -r "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" ] \
- && bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" -O | grep -q ${pkgbase}) \
- && fail "${pkgbase} should not be in ${repo}/os/${arch}/${repo}${DBEXT%.tar.*}"
+ ( [ -r "${FTP_BASE}/testing/os/${arch}/testing${DBEXT%.tar.*}" ] \
+ && bsdtar -xf "${FTP_BASE}/testing/os/${arch}/testing${DBEXT%.tar.*}" -O | grep -q ${pkgbase}) \
+ && fail "${pkgbase} should not be in testing/os/${arch}/testing${DBEXT%.tar.*}"
done
}