summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-progress-fd-conffile
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-01-15 18:44:47 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-01-15 22:58:50 +0100
commitf74a6fa120759d0a1bd4a5aff0dc2c50911b5407 (patch)
treeaf08070ef3b99b13a73f8aefc652fc0e16ea1fea /test/integration/test-apt-progress-fd-conffile
parent50bd6fd3794dd1f61185302129dc6cd218d20b98 (diff)
rework some testcases to not spit out text
Rework also uncovers two FIXMEs Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-apt-progress-fd-conffile')
-rwxr-xr-xtest/integration/test-apt-progress-fd-conffile17
1 files changed, 12 insertions, 5 deletions
diff --git a/test/integration/test-apt-progress-fd-conffile b/test/integration/test-apt-progress-fd-conffile
index 0b42b1b2f..085d5e871 100755
--- a/test/integration/test-apt-progress-fd-conffile
+++ b/test/integration/test-apt-progress-fd-conffile
@@ -32,12 +32,19 @@ testsuccess aptget install compiz-core=1.0
# fake conffile change
echo "meep" >> rootdir/etc/compiz.conf/compiz.conf
-# install
+# 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'
+OUTPUT=$(mktemp)
+addtrap "rm $OUTPUT;"
exec 3> apt-progress.log
-echo n | aptget install compiz-core=2.0 -o APT::Status-Fd=3 -o Dpkg::Use-Pty=false
+if aptget install compiz-core=2.0 -o APT::Status-Fd=3 -o Dpkg::Use-Pty=false -o dpkg::options::='--force-confold' >${OUTPUT} 2>&1; then
+ msgpass
+else
+ echo
+ cat $OUTPUT
+ msgfail
+fi
# and ensure there is a conffile message in the file
-msgtest "Conffile prompt in apt-progress.log"
+msgtest 'Test status fd for an included' 'pmconffile msg'
grep -q "pmconffile:/etc/compiz.conf/compiz.conf" apt-progress.log && msgpass || (cat apt-progress.log && msgfail)
-
-cat apt-progress.log \ No newline at end of file