summaryrefslogtreecommitdiffstats
path: root/debian/tests/utils.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:49:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:49:00 +0000
commit93907d0c009d758811b54e7984337477a39f05cf (patch)
treea34881e1b02ccd5281ca58a799877f2d5e80d778 /debian/tests/utils.sh
parentAdding upstream version 4.6.0. (diff)
downloadcrmsh-debian/4.6.0-1.tar.xz
crmsh-debian/4.6.0-1.zip
Adding debian version 4.6.0-1.debian/4.6.0-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/utils.sh')
-rwxr-xr-xdebian/tests/utils.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/tests/utils.sh b/debian/tests/utils.sh
new file mode 100755
index 0000000..6ff8480
--- /dev/null
+++ b/debian/tests/utils.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -ex
+
+export LC_ALL=C
+PKG=fence-virt
+
+dpkg --purge $PKG
+
+# package not installed
+/usr/share/crmsh/utils/crm_rpmcheck.py $PKG | grep error
+
+# install
+/usr/share/crmsh/utils/crm_pkg.py -n $PKG -s present | grep Unpacking
+/usr/share/crmsh/utils/crm_rpmcheck.py $PKG | grep status
+dpkg --status $PKG
+
+# upgrade
+/usr/share/crmsh/utils/crm_pkg.py -n $PKG -s latest | grep False
+
+# purge
+/usr/share/crmsh/utils/crm_pkg.py -n $PKG -s removed | egrep 'Removing|Purging'
+/usr/share/crmsh/utils/crm_rpmcheck.py $PKG | grep error
+
+# clean
+cd $AUTOPKGTEST_TMP
+mkdir dir
+touch dir/file
+cp /usr/share/crmsh/utils/crm_clean.py .
+$PWD/crm_clean.py $PWD/crm_clean.py $PWD/dir
+if ls | grep .; then
+ exit 1
+fi