diff options
author | David Kalnischkies <david@kalnischkies.de> | 2018-05-19 21:10:17 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2018-05-19 21:39:08 +0200 |
commit | ea901a491bcfe406267c7c38c227c5caabf017a0 (patch) | |
tree | 17585464631eddf1cffc3a994d8ba1de123254cf /test/integration | |
parent | dd23021f588f5d50171cfb0d54108f594b139b26 (diff) |
Fix hidden test failure if not called via sudo
id: '': no such user
./test-bug-611729-mark-as-manual: 59: [: Illegal number:
Regression-of: 68842e1741a5005b1e3f0a07deffd737c65e3294
Gbp-Dch: Ignore
Diffstat (limited to 'test/integration')
-rwxr-xr-x | test/integration/test-bug-611729-mark-as-manual | 2 | ||||
-rwxr-xr-x | test/integration/test-disappearing-packages | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/test-bug-611729-mark-as-manual b/test/integration/test-bug-611729-mark-as-manual index 4bcd25f0f..63f8245a7 100755 --- a/test/integration/test-bug-611729-mark-as-manual +++ b/test/integration/test-bug-611729-mark-as-manual @@ -56,7 +56,7 @@ testdpkginstalled b c testmarkedauto 'b' sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -if [ -n "$SUDO_USER" -a "$(id -u "$SUDO_USER")" -gt 0 ]; then +if [ -n "$SUDO_USER" ] && [ "$(id -u "$SUDO_USER")" -gt 0 ]; then testfileequal 'rootdir/var/log/apt/history.log' " Requested-By: $SUDO_USER ($(id -u "$SUDO_USER")) Reinstall: b:i386 (1.0)" diff --git a/test/integration/test-disappearing-packages b/test/integration/test-disappearing-packages index b27755361..f3fed04f3 100755 --- a/test/integration/test-disappearing-packages +++ b/test/integration/test-disappearing-packages @@ -60,7 +60,7 @@ all files have been overwritten by other packages: Note: This is done automatically and on purpose by dpkg.' tail -n 4 disappear.output sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -e "s#:$(getarchitecture 'native') #:native #" -if [ -n "$SUDO_USER" -a "$(id -u "$SUDO_USER")" -gt 0 ]; then +if [ -n "$SUDO_USER" ] && [ "$(id -u "$SUDO_USER")" -gt 0 ]; then testfileequal 'rootdir/var/log/apt/history.log' " Requested-By: $SUDO_USER ($(id -u "$SUDO_USER")) Install: old-pkg:native (1) |