summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-01-27 13:30:02 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-01-27 13:30:02 +0100
commit7222a50e44f815fd2ba17a9a94efd3cc9fa4bcd7 (patch)
tree51535facd9b93a6731395d6b159fa0bf9e6c5317 /test
parent4da9bf112b07c94a7fd65a729ce62610ade8e5aa (diff)
downloaddbscripts-7222a50e44f815fd2ba17a9a94efd3cc9fa4bcd7.tar.gz
dbscripts-7222a50e44f815fd2ba17a9a94efd3cc9fa4bcd7.tar.xz
test: add testUpdateSameAnyPackageToSameRepository
Diffstat (limited to 'test')
-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
}