From 76e2632459410dec81337edb6a9fee33c9a660f3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 11:59:37 +0200 Subject: Adding upstream version 2.7.12. Signed-off-by: Daniel Baumann --- test/integration/test-ignored-files | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 test/integration/test-ignored-files (limited to 'test/integration/test-ignored-files') diff --git a/test/integration/test-ignored-files b/test/integration/test-ignored-files new file mode 100755 index 0000000..bc9eefb --- /dev/null +++ b/test/integration/test-ignored-files @@ -0,0 +1,42 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" + +setupenvironment +configarchitecture 'amd64' +setupaptarchive + +msgmsg "Check notices about .list and .sources directories in sources.list.d" +mkdir rootdir/etc/apt/sources.list.d/a-dir-that-will-be-ignored +mkdir rootdir/etc/apt/sources.list.d/a-dir-that-will-be-ignored.conf +mkdir rootdir/etc/apt/sources.list.d/a-dir-that-will-not-be-ignored.list +mkdir rootdir/etc/apt/sources.list.d/a-dir-that-will-not-be-ignored.sources +testsuccesswithnotice apt update +testequalor2 "Reading package lists... +Building dependency tree... +All packages are up to date. +N: Ignoring 'a-dir-that-will-not-be-ignored.sources' in directory '${TMPWORKINGDIRECTORY}/rootdir/etc/apt/sources.list.d/' as it is not a regular file +N: Ignoring 'a-dir-that-will-not-be-ignored.list' in directory '${TMPWORKINGDIRECTORY}/rootdir/etc/apt/sources.list.d/' as it is not a regular file" "Reading package lists... +Building dependency tree... +All packages are up to date. +N: Ignoring 'a-dir-that-will-not-be-ignored.list' in directory '${TMPWORKINGDIRECTORY}/rootdir/etc/apt/sources.list.d/' as it is not a regular file +N: Ignoring 'a-dir-that-will-not-be-ignored.sources' in directory '${TMPWORKINGDIRECTORY}/rootdir/etc/apt/sources.list.d/' as it is not a regular file" cat rootdir/tmp/testsuccesswithnotice.output +rmdir rootdir/etc/apt/sources.list.d/a-dir-* + +msgmsg "Check for notices about .conf directories in apt.conf.d" +mkdir -p rootdir/etc/apt/apt.conf.d/a-dir-that-will-be-ignored +mkdir -p rootdir/etc/apt/apt.conf.d/a-dir-that-will-be-ignored.list +mkdir -p rootdir/etc/apt/apt.conf.d/a-dir-that-will-not-be-ignored.conf +testsuccessequal "N: Ignoring 'a-dir-that-will-not-be-ignored.conf' in directory '${TMPWORKINGDIRECTORY}/rootdir/etc/apt/apt.conf.d/' as it is not a regular file" aptconfig shell +rmdir rootdir/etc/apt/apt.conf.d/a-dir-* + +msgmsg "Check for directory notices in preferences.d" +mkdir -p rootdir/etc/apt/preferences.d/a-dir-that-will-be-ignored +mkdir -p rootdir/etc/apt/preferences.d/a-dir-that-will-be-ignored.conf +mkdir -p rootdir/etc/apt/preferences.d/a-dir-that-will-not-be-ignored.pref +testsuccessequal "Package files: +Pinned packages: +N: Ignoring 'a-dir-that-will-not-be-ignored.pref' in directory '${TMPWORKINGDIRECTORY}/rootdir/etc/apt/preferences.d/' as it is not a regular file" apt policy +rmdir rootdir/etc/apt/preferences.d/a-dir-* -- cgit v1.2.3