summaryrefslogtreecommitdiff
path: root/test/integration/test-sourceslist-trusted-options
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2015-08-18 11:57:35 +0200
committerMichael Vogt <mvo@debian.org>2015-08-18 11:57:35 +0200
commitb53c9cea2902572822bbbece5bac236c1bbf846e (patch)
tree6c6b0524e0971c0623ccbff71383523ee0b2a5cc /test/integration/test-sourceslist-trusted-options
parent21248c0f00ee71412dbadc6ebf84011cf974346d (diff)
parent2a22cd60f04c4291ea9b9b72e15b6d2ec378b001 (diff)
Merge remote-tracking branch 'upstream/debian/experimental' into feature/srv-records
Diffstat (limited to 'test/integration/test-sourceslist-trusted-options')
-rwxr-xr-xtest/integration/test-sourceslist-trusted-options17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/integration/test-sourceslist-trusted-options b/test/integration/test-sourceslist-trusted-options
index 5fe4933ce..86036e242 100755
--- a/test/integration/test-sourceslist-trusted-options
+++ b/test/integration/test-sourceslist-trusted-options
@@ -199,3 +199,20 @@ insecureaptgetupdate
everythingfails
everythingfails -t stable
everythingfails -t testing
+
+msgmsg 'Test conflicting trusted options are refused'
+testsource() {
+ echo "$@" > rootdir/etc/apt/sources.list.d/example.list
+ testfailuremsg 'E: Conflicting values set for option Trusted concerning source http://example.org/bad/ unstable
+E: The list of sources could not be read.' aptget update --print-uris
+}
+for VAL in 'yes' 'no'; do
+ testsource "deb http://example.org/bad unstable main
+deb [trusted=${VAL}] http://example.org/bad unstable non-free"
+ testsource "deb [trusted=${VAL}] http://example.org/bad unstable main
+deb http://example.org/bad unstable non-free"
+done
+testsource 'deb [trusted=yes] http://example.org/bad unstable main
+deb [trusted=no] http://example.org/bad unstable non-free'
+testsource 'deb [trusted=no] http://example.org/bad unstable main
+deb [trusted=yes] http://example.org/bad unstable non-free'