summaryrefslogtreecommitdiffstats
path: root/debian/tests/no-nsswitch-conf
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 04:42:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 04:42:34 +0000
commitc5efd282371d5b199d2d96c13ea3334a42161dfb (patch)
treefb8f55cadae3b93ef210a1be5237a7834362e6d4 /debian/tests/no-nsswitch-conf
parentAdding upstream version 1.7. (diff)
downloaddh-nss-c5efd282371d5b199d2d96c13ea3334a42161dfb.tar.xz
dh-nss-c5efd282371d5b199d2d96c13ea3334a42161dfb.zip
Adding debian version 1.7.debian/1.7debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xdebian/tests/no-nsswitch-conf26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/tests/no-nsswitch-conf b/debian/tests/no-nsswitch-conf
new file mode 100755
index 0000000..2d020f3
--- /dev/null
+++ b/debian/tests/no-nsswitch-conf
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -eu
+
+. "$(dirname "$0")/shared-functions.sh"
+
+testname="$(basename "$0")"
+pkgname="libnss-test-$testname"
+
+nss_lines="hosts first mynss"
+
+echo "Set up and build test packages..."
+cd "$AUTOPKGTEST_TMP"
+mkdir "$pkgname"
+cd "$pkgname"
+setup_pkg "$pkgname" "$testname"
+build_pkg "$pkgname" "1" "$nss_lines"
+
+cd "$AUTOPKGTEST_TMP"
+
+echo "Remove /etc/nsswitch.conf..."
+rm /etc/nsswitch.conf
+
+echo "Test that installing the package does not recreate /etc/nsswitch.conf"
+dpkg --install "${pkgname}_1_all.deb"
+test ! -e /etc/nsswitch.conf && echo "OK"