summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-07-18 23:41:29 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-07-21 08:17:17 +0200
commit47aca3cfc17ee23c37693b4e53c675a74b38decd (patch)
tree8112560d31700e67429e0a2a4a479e22cd63d424 /test
parent564720959e4ae47921b795fe6c5ce46e1e1bdc95 (diff)
add pkgAcquire::TransactionHasError()
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-update-transactions23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/integration/test-apt-update-transactions b/test/integration/test-apt-update-transactions
new file mode 100755
index 000000000..ee8d20dbf
--- /dev/null
+++ b/test/integration/test-apt-update-transactions
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture "i386"
+
+insertpackage 'unstable' 'foo' 'all' '1.0'
+
+setupaptarchive --no-update
+changetowebserver
+
+# break package file
+cat > aptarchive/dists/unstable/main/binary-i386/Packages <<EOF
+Package: bar
+EOF
+compressfile aptarchive/dists/unstable/main/binary-i386/Packages '+1hour'
+
+# ensure that a update will only succeed entirely or not at all
+testfailure aptget update
+testequal "partial" ls rootdir/var/lib/apt/lists