summaryrefslogtreecommitdiff
path: root/test/integration/test-external-dependency-solver-protocol
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-12 10:35:49 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-14 15:22:19 +0200
commit7414af7fa88164209eec9c585b8d175c1618ecbc (patch)
tree2a582637043bd8c57d43bf8b193dd9ecb479d559 /test/integration/test-external-dependency-solver-protocol
parent7c4f1ca5fe315a8223570b05994d6d7ca7c55c4f (diff)
various changes to increase test-coverage
And of course, testing obscure things ends up showing obscure 'bugs' or better shortcomings/inconsitencies, so lets fix them with the tests. Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-external-dependency-solver-protocol')
-rwxr-xr-xtest/integration/test-external-dependency-solver-protocol13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol
index 3654e705c..a9746d4a2 100755
--- a/test/integration/test-external-dependency-solver-protocol
+++ b/test/integration/test-external-dependency-solver-protocol
@@ -27,6 +27,9 @@ setupaptarchive
testfailure aptget install --solver dump coolstuff -s
testsuccess grep ERR_NO_FILENAME rootdir/tmp/testfailure.output
+export APT_EDSP_DUMP_FILENAME="/nonexistent/apt/edsp.dump"
+testfailure aptget install --solver dump coolstuff -s
+testsuccess grep ERR_WRITE_ERROR rootdir/tmp/testfailure.output
export APT_EDSP_DUMP_FILENAME="${TMPWORKINGDIRECTORY}/downloaded/dump.edsp"
testfailureequal 'Reading package lists...
@@ -111,6 +114,14 @@ testfailure aptget install awesome badstuff -s --solver apt
testsuccess grep 'ERR_UNSOLVABLE' rootdir/tmp/testfailure.output
configarchitecture 'armel'
+testfailure aptget install --solver apt awesomecoolstuff:i386 -s
+msgtest 'An invalid EDSP file generates a' 'hard error'
+if echo "Request: This is a test\nFoo: bar\n\n" | aptinternalsolver -q=0 > solver.result 2>&1; then
+ cat solver.result
+ msgfail
+else
+ msgpass
+fi
msgtest 'Test direct calling is okay for' 'apt-internal-solver'
cat "$APT_EDSP_DUMP_FILENAME" | aptinternalsolver -q=0 > solver.result 2>&1 || true
if [ "$(tail -n2 solver.result | head -n1 )" = "Message: Done" ]; then
@@ -121,8 +132,6 @@ else
fi
rm -f "$APT_EDSP_DUMP_FILENAME"
-testfailure aptget install --solver apt awesomecoolstuff:i386 -s
-
testsuccess aptinternalsolver scenario
testsuccessequal 'Package: stuff
Source: stuff