summaryrefslogtreecommitdiff
path: root/test/integration/test-disappearing-packages
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-01-25 19:14:37 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-01-25 19:14:37 +0100
commit0479205d5869805da3122e2683d2e5ecd0058815 (patch)
tree6c8d4ae961df7e32dc05cabef49fb62f1008305e /test/integration/test-disappearing-packages
parenta249b3e6fd798935a02b769149c9791a6fa6ef16 (diff)
fix tests run via sudo checking the history file
Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-disappearing-packages')
-rwxr-xr-xtest/integration/test-disappearing-packages13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/integration/test-disappearing-packages b/test/integration/test-disappearing-packages
index b922d2f72..177491d81 100755
--- a/test/integration/test-disappearing-packages
+++ b/test/integration/test-disappearing-packages
@@ -44,11 +44,22 @@ $CMD 2>&1 | tail -n 4 | diff -u "$COMPAREFILE" - && msgpass || msgfail
rm "$COMPAREFILE"
sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -e "s#:$(getarchitecture 'native') #:native #"
-testfileequal 'rootdir/var/log/apt/history.log' '
+if [ -n "$SUDO_USER" ]; then
+ testfileequal 'rootdir/var/log/apt/history.log' "
+Requested-By: $SUDO_USER ($(id -u "$SUDO_USER"))
+Install: old-pkg:native (1.0)
+
+Requested-By: $SUDO_USER ($(id -u "$SUDO_USER"))
+Install: new-pkg:native (2.0, automatic)
+Upgrade: old-pkg:native (1.0, 2.0)
+Disappeared: old-pkg (1.0)"
+else
+ testfileequal 'rootdir/var/log/apt/history.log' '
Install: old-pkg:native (1.0)
Install: new-pkg:native (2.0, automatic)
Upgrade: old-pkg:native (1.0, 2.0)
Disappeared: old-pkg (1.0)'
+fi
testmarkedauto # new-pkg should have get the manual flag from old-pkg