From 7222a50e44f815fd2ba17a9a94efd3cc9fa4bcd7 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 27 Jan 2011 13:30:02 +0100 Subject: test: add testUpdateSameAnyPackageToSameRepository --- test/test.d/db-update.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'test') 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 } -- cgit v1.2.3-24-g4f1b