summaryrefslogtreecommitdiff
path: root/test/integration/test-sourceslist-trusted-options
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-10-20 10:23:41 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-10-20 10:37:46 +0200
commit4fa34122cbe347d21b3a162ff2fa75dd2e73c3a8 (patch)
tree07de5c1bedf542cb0111cdf9f7aecd03c4affee9 /test/integration/test-sourceslist-trusted-options
parent1df24acfdb8ba1cd8bbbaa166f170dda480ce41e (diff)
testcases: do not allow warnings in testsuccess
Adds a new testwarning which tests for zero exit and the presents of a warning in the output, failing if either is not the case or if an error is found, too. This allows us to change testsuccess to accept only totally successful executions (= without warnings) which should help finding regressions. Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-sourceslist-trusted-options')
-rwxr-xr-xtest/integration/test-sourceslist-trusted-options12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/integration/test-sourceslist-trusted-options b/test/integration/test-sourceslist-trusted-options
index c954f2f4f..28415dd62 100755
--- a/test/integration/test-sourceslist-trusted-options
+++ b/test/integration/test-sourceslist-trusted-options
@@ -57,14 +57,14 @@ aptgetupdate() {
# note that insecure with trusted=yes are allowed
# as the trusted=yes indicates that security is provided by
# something above the understanding of apt
- testsuccess aptget update --no-allow-insecure-repositories
+ ${1:-testsuccess} aptget update --no-allow-insecure-repositories
}
insecureaptgetupdate() {
rm -rf rootdir/var/lib/apt/lists
testfailure aptget update --no-allow-insecure-repositories
rm -rf rootdir/var/lib/apt/lists
- testsuccess aptget update --allow-insecure-repositories
+ testwarning aptget update --allow-insecure-repositories
}
msgmsg 'Test without trusted option and good sources'
@@ -103,7 +103,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
+aptgetupdate 'testwarning'
everythingsucceeds
everythingsucceeds -t stable
everythingsucceeds -t testing
@@ -128,7 +128,7 @@ everythingsucceeds -t testing
msgmsg 'Test with trusted=yes option and good and unknown 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
+aptgetupdate 'testwarning'
everythingsucceeds
everythingsucceeds -t stable
everythingsucceeds -t testing
@@ -154,7 +154,7 @@ everythingsucceeds -t testing
msgmsg 'Test with trusted=yes option and good and expired 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
+aptgetupdate 'testwarning'
everythingsucceeds
everythingsucceeds -t stable
everythingsucceeds -t testing
@@ -181,7 +181,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
+aptgetupdate 'testwarning'
everythingsucceeds
everythingsucceeds -t stable
everythingsucceeds -t testing