diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:07:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:07:13 +0000 |
commit | 636c7dc17286d93d788c741d15fd756aeda066d5 (patch) | |
tree | e7ae158cc54f591041a061b9865bcae51854f15c /test/integration/test-apt-progress-fd-conffile | |
parent | Initial commit. (diff) | |
download | apt-upstream.tar.xz apt-upstream.zip |
Adding upstream version 1.8.2.3.upstream/1.8.2.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/test-apt-progress-fd-conffile')
-rwxr-xr-x | test/integration/test-apt-progress-fd-conffile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/integration/test-apt-progress-fd-conffile b/test/integration/test-apt-progress-fd-conffile new file mode 100755 index 0000000..9fb6fbe --- /dev/null +++ b/test/integration/test-apt-progress-fd-conffile @@ -0,0 +1,42 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" + +setupenvironment +configarchitecture 'native' + +# old conffile +setupsimplenativepackage 'compiz-core' 'native' '1.0' 'unstable' +BUILDDIR='incoming/compiz-core-1.0' +mkdir -p "${BUILDDIR}/debian/compiz-core/etc" +echo 'foo=bar;' > "${BUILDDIR}/compiz.conf" +echo 'compiz.conf /etc/compiz.conf' >> "${BUILDDIR}/debian/install" +buildpackage "$BUILDDIR" 'unstable' 'main' 'native' +rm -rf "$BUILDDIR" + +# new conffile +setupsimplenativepackage 'compiz-core' 'native' '2.0' 'unstable' +BUILDDIR='incoming/compiz-core-2.0' +mkdir -p "${BUILDDIR}/debian/compiz-core/etc" +echo 'foo2=bar2;' > "${BUILDDIR}/compiz.conf" +echo 'compiz.conf /etc/compiz.conf' >> "${BUILDDIR}/debian/install" +buildpackage "$BUILDDIR" 'unstable' 'main' 'native' +rm -rf "$BUILDDIR" + +setupaptarchive + +testsuccess aptget install compiz-core=1.0 + +# fake conffile change +echo 'meep' >> rootdir/etc/compiz.conf/compiz.conf + +# FIXME: Is there really no way to see if dpkg actually prompts? +msgtest 'Test for successful execution of' 'apt-get install compiz-core=2.0' +exec 3> apt-progress.log +testsuccess --nomsg aptget install compiz-core=2.0 -o APT::Status-Fd=3 -o Dpkg::Use-Pty=false -o dpkg::options::='--force-confold' + +# and ensure there is a conffile message in the file +msgtest 'Test status fd for an included' 'pmconffile msg' +testsuccess --nomsg grep "pmconffile:/etc/compiz.conf/compiz.conf" apt-progress.log |