summaryrefslogtreecommitdiff
path: root/test/integration/test-releasefile-valid-until
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2013-08-10 10:01:06 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2013-08-12 18:01:37 +0200
commit0440d936d70b1e331d49bbc32735f1b749632604 (patch)
tree9a422e857c5fc895e1992eca2077f7c105cbe0ac /test/integration/test-releasefile-valid-until
parent29a59c460403820d0f039398194e321b7e0921fc (diff)
add chronic-like testsuccess/testfailure helpers
For many commands the output isn't stable (like then dpkg is called) but the exitcode is, so this helper enhances the common && msgpass || msgfail by generating automatically a msgtest and showing the output of the command in case of failure instead of discarding it unconditionally, the later being chronic-like behaviour Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-releasefile-valid-until')
-rwxr-xr-xtest/integration/test-releasefile-valid-until32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/integration/test-releasefile-valid-until b/test/integration/test-releasefile-valid-until
index 680a370cb..e673d5f71 100755
--- a/test/integration/test-releasefile-valid-until
+++ b/test/integration/test-releasefile-valid-until
@@ -32,64 +32,64 @@ aptgetupdate() {
setupreleasefile
msgtest 'Release file is accepted as it has' 'no Until'
-aptgetupdate && msgpass || msgfail
+testsuccess --nomsg aptgetupdate
setupreleasefile
msgtest 'Release file is accepted as it has' 'no Until and good Max-Valid'
-aptgetupdate -o Acquire::Max-ValidTime=3600 && msgpass || msgfail
+testsuccess --nomsg aptgetupdate -o Acquire::Max-ValidTime=3600
setupreleasefile 'now - 2 days'
msgtest 'Release file is rejected as it has' 'no Until, but bad Max-Valid'
-aptgetupdate -o Acquire::Max-ValidTime=3600 && msgfail || msgpass
+testfailure --nomsg aptgetupdate -o Acquire::Max-ValidTime=3600
setupreleasefile 'now - 3 days' 'now + 1 day'
msgtest 'Release file is accepted as it has' 'good Until'
-aptgetupdate && msgpass || msgfail
+testsuccess --nomsg aptgetupdate
setupreleasefile 'now - 7 days' 'now - 4 days'
msgtest 'Release file is rejected as it has' 'bad Until'
-aptgetupdate && msgfail || msgpass
+testfailure --nomsg aptgetupdate
setupreleasefile 'now - 7 days' 'now - 4 days'
msgtest 'Release file is rejected as it has' 'bad Until (ignore good Max-Valid)'
-aptgetupdate -o Acquire::Max-ValidTime=1209600 && msgfail || msgpass
+testfailure --nomsg aptgetupdate -o Acquire::Max-ValidTime=1209600
setupreleasefile 'now - 7 days' 'now - 4 days'
msgtest 'Release file is rejected as it has' 'bad Max-Valid (bad Until)'
-aptgetupdate -o Acquire::Max-ValidTime=86400 && msgfail || msgpass
+testfailure --nomsg aptgetupdate -o Acquire::Max-ValidTime=86400
setupreleasefile 'now - 7 days' 'now + 4 days'
msgtest 'Release file is rejected as it has' 'bad Max-Valid (good Until)'
-aptgetupdate -o Acquire::Max-ValidTime=86400 && msgfail || msgpass
+testfailure --nomsg aptgetupdate -o Acquire::Max-ValidTime=86400
setupreleasefile 'now - 7 days' 'now + 4 days'
msgtest 'Release file is accepted as it has' 'good labeled Max-Valid'
-aptgetupdate -o Acquire::Max-ValidTime=86400 -o Acquire::Max-ValidTime::Testcases=1209600 && msgpass || msgfail
+testsuccess --nomsg aptgetupdate -o Acquire::Max-ValidTime=86400 -o Acquire::Max-ValidTime::Testcases=1209600
setupreleasefile 'now - 7 days' 'now + 4 days'
msgtest 'Release file is rejected as it has' 'bad labeled Max-Valid'
-aptgetupdate -o Acquire::Max-ValidTime=1209600 -o Acquire::Max-ValidTime::Testcases=86400 && msgfail || msgpass
+testfailure --nomsg aptgetupdate -o Acquire::Max-ValidTime=1209600 -o Acquire::Max-ValidTime::Testcases=86400
setupreleasefile 'now - 7 days' 'now + 1 days'
msgtest 'Release file is accepted as it has' 'good Until (good Min-Valid, no Max-Valid)'
-aptgetupdate -o Acquire::Min-ValidTime=1209600 && msgpass || msgfail
+testsuccess --nomsg aptgetupdate -o Acquire::Min-ValidTime=1209600
setupreleasefile 'now - 7 days' 'now - 4 days'
msgtest 'Release file is accepted as it has' 'good Min-Valid (bad Until, no Max-Valid)'
-aptgetupdate -o Acquire::Min-ValidTime=1209600 && msgpass || msgfail
+testsuccess --nomsg aptgetupdate -o Acquire::Min-ValidTime=1209600
setupreleasefile 'now - 7 days' 'now - 2 days'
msgtest 'Release file is accepted as it has' 'good Min-Valid (bad Until, good Max-Valid) <'
-aptgetupdate -o Acquire::Min-ValidTime=1209600 -o Acquire::Max-ValidTime=2419200 && msgpass || msgfail
+testsuccess --nomsg aptgetupdate -o Acquire::Min-ValidTime=1209600 -o Acquire::Max-ValidTime=2419200
setupreleasefile 'now - 7 days' 'now - 2 days'
msgtest 'Release file is rejected as it has' 'bad Max-Valid (bad Until, good Min-Valid) >'
-aptgetupdate -o Acquire::Max-ValidTime=12096 -o Acquire::Min-ValidTime=2419200 && msgfail || msgpass
+testfailure --nomsg aptgetupdate -o Acquire::Max-ValidTime=12096 -o Acquire::Min-ValidTime=2419200
setupreleasefile 'now - 7 days' 'now - 2 days'
msgtest 'Release file is rejected as it has' 'bad Max-Valid (bad Until, bad Min-Valid) <'
-aptgetupdate -o Acquire::Min-ValidTime=12096 -o Acquire::Max-ValidTime=241920 && msgfail || msgpass
+testfailure --nomsg aptgetupdate -o Acquire::Min-ValidTime=12096 -o Acquire::Max-ValidTime=241920
setupreleasefile 'now - 7 days' 'now - 2 days'
msgtest 'Release file is rejected as it has' 'bad Max-Valid (bad Until, bad Min-Valid) >'
-aptgetupdate -o Acquire::Max-ValidTime=12096 -o Acquire::Min-ValidTime=241920 && msgfail || msgpass
+testfailure --nomsg aptgetupdate -o Acquire::Max-ValidTime=12096 -o Acquire::Min-ValidTime=241920