]>
git.saurik.com Git - apt.git/blob - test/integration/test-releasefile-valid-until
35498f6d1aac5ca22082c02bad85b3b2b30f29c0
4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'i386'
9 insertpackage
'wheezy' 'apt' 'all' '0.8.15'
14 rm -rf rootdir
/var
/lib
/apt
/lists
16 generatereleasefiles
"$1" "$2"
21 if aptget update $
* 2>&1 | grep -q 'is expired'; then
29 msgtest
'Release file is accepted as it has' 'no Until'
30 aptgetupdate
&& msgpass
|| msgfail
33 msgtest
'Release file is accepted as it has' 'no Until and good Max-Valid'
34 aptgetupdate
-o Acquire
::Max
-ValidTime=3600 && msgpass
|| msgfail
36 setupreleasefile
'now - 2 days'
37 msgtest
'Release file is rejected as it has' 'no Until, but bad Max-Valid'
38 aptgetupdate
-o Acquire
::Max
-ValidTime=3600 && msgfail
|| msgpass
40 setupreleasefile
'now - 3 days' 'now + 1 day'
41 msgtest
'Release file is accepted as it has' 'good Until'
42 aptgetupdate
&& msgpass
|| msgfail
44 setupreleasefile
'now - 7 days' 'now - 4 days'
45 msgtest
'Release file is rejected as it has' 'bad Until'
46 aptgetupdate
&& msgfail
|| msgpass
48 setupreleasefile
'now - 7 days' 'now - 4 days'
49 msgtest
'Release file is rejected as it has' 'bad Until (ignore good Max-Valid)'
50 aptgetupdate
-o Acquire
::Max
-ValidTime=1209600 && msgfail
|| msgpass
52 setupreleasefile
'now - 7 days' 'now - 4 days'
53 msgtest
'Release file is rejected as it has' 'bad Max-Valid (bad Until)'
54 aptgetupdate
-o Acquire
::Max
-ValidTime=86400 && msgfail
|| msgpass
56 setupreleasefile
'now - 7 days' 'now + 4 days'
57 msgtest
'Release file is rejected as it has' 'bad Max-Valid (good Until)'
58 aptgetupdate
-o Acquire
::Max
-ValidTime=86400 && msgfail
|| msgpass
60 setupreleasefile
'now - 7 days' 'now + 4 days'
61 msgtest
'Release file is accepted as it has' 'good labeled Max-Valid'
62 aptgetupdate
-o Acquire
::Max
-ValidTime=86400 -o Acquire
::Max
-ValidTime::Testcases
=1209600 && msgpass
|| msgfail
64 setupreleasefile
'now - 7 days' 'now + 4 days'
65 msgtest
'Release file is rejected as it has' 'bad labeled Max-Valid'
66 aptgetupdate
-o Acquire
::Max
-ValidTime=1209600 -o Acquire
::Max
-ValidTime::Testcases
=86400 && msgfail
|| msgpass