diff options
Diffstat (limited to 'extra/xbs-lukeshu/test/test.d/db-repo-remove.sh')
-rwxr-xr-x | extra/xbs-lukeshu/test/test.d/db-repo-remove.sh | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/extra/xbs-lukeshu/test/test.d/db-repo-remove.sh b/extra/xbs-lukeshu/test/test.d/db-repo-remove.sh new file mode 100755 index 0000000..eec0109 --- /dev/null +++ b/extra/xbs-lukeshu/test/test.d/db-repo-remove.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +curdir=$(readlink -e $(dirname $0)) +. "${curdir}/../lib/common.inc" + +testRemovePackages() { + local arches=(`arches`) + local pkgs=('pkg-simple-a' 'pkg-simple-b' '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 pkgbase in ${pkgs[@]}; do + for arch in ${arches[@]}; do + ../db-repo-remove extra ${arch} ${pkgbase} + done + done + + for pkgbase in ${pkgs[@]}; do + for arch in ${arches[@]}; do + checkRemovedPackageDB extra ${pkgbase} ${arch} + done + done +} + +testRemoveMultiplePackages() { + local arches=(`arches`) + local pkgs=('pkg-simple-a' 'pkg-simple-b' '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-repo-remove extra ${arch} ${pkgs[@]} + done + + for pkgbase in ${pkgs[@]}; do + for arch in ${arches[@]}; do + checkRemovedPackageDB extra ${pkgbase} ${arch} + done + done +} + +. "${curdir}/../lib/shunit2" |