diff options
author | Michael Vogt <mvo@ubuntu.com> | 2015-10-05 15:21:47 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2015-10-05 15:21:47 +0200 |
commit | 6f2f5f4afa6f628ad3d068e9ba55fc6455eefa12 (patch) | |
tree | d360bbbdff678c19142facabc46f30f693fe32e9 /test/integration/test-security-no-remote-status | |
parent | 1f5a2d63b784eb919143d0be3f2dee7ff0bb7e83 (diff) | |
parent | 56e47f3111ad714c6506c0d60dccb92cfc9311cb (diff) |
Merge branch 'debian/sid' into ubuntu/master
Diffstat (limited to 'test/integration/test-security-no-remote-status')
-rwxr-xr-x | test/integration/test-security-no-remote-status | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/integration/test-security-no-remote-status b/test/integration/test-security-no-remote-status new file mode 100755 index 000000000..b7cd0b0d1 --- /dev/null +++ b/test/integration/test-security-no-remote-status @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Test that packages from remote sources cannot set the Status field. +# +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' + +TMPDIR=$(readlink -f .) + +insertpackage 'unstable' 'pretends-installed' 'all' '1' 'Status: install ok installed' +insertinstalledpackage 'really-installed' 'all' '1' +setupaptarchive + +testequal "pretends-installed: + Installed: (none) + Candidate: 1 + Version table: + 1 0 + 500 file:${TMPDIR}/aptarchive/ unstable/main amd64 Packages" aptcache policy pretends-installed + +testequal "really-installed: + Installed: 1 + Candidate: 1 + Version table: + *** 1 0 + 100 ${TMPDIR}/rootdir/var/lib/dpkg/status" aptcache policy really-installed |