]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-sourceslist-trusted-options
buildsystem: deal with spaces in path to source
[apt.git] / test / integration / test-sourceslist-trusted-options
index 5fe4933ce636c41eefa787a320ddb98074858b61..26de76807959267b502c7a7db8aa1ed1c19a053e 100755 (executable)
@@ -109,7 +109,7 @@ everythingsucceeds -t testing
 msgmsg 'Test with trusted=yes option and good and unsigned sources'
 cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/
 sed -i 's#^deb\(-src\)\? #deb\1 [trusted=yes] #' rootdir/etc/apt/sources.list.d/*
-aptgetupdate 'testwarning'
+aptgetupdate
 everythingsucceeds
 everythingsucceeds -t stable
 everythingsucceeds -t testing
@@ -187,7 +187,7 @@ everythingfails -t testing
 msgmsg 'Test with trusted=yes option and unsigned and good sources'
 cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/
 sed -i 's#^deb\(-src\)\? #deb\1 [trusted=yes] #' rootdir/etc/apt/sources.list.d/*
-aptgetupdate 'testwarning'
+aptgetupdate
 everythingsucceeds
 everythingsucceeds -t stable
 everythingsucceeds -t testing
@@ -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 regarding 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'