]> git.saurik.com Git - apt.git/blob - test/integration/test-apt-get-update-unauth-warning
Add new configallowinsecurerepositories to the test framework
[apt.git] / test / integration / test-apt-get-update-unauth-warning
1 #!/bin/sh
2 #
3 # ensure we print warnings for unauthenticated repositories
4 #
5 set -e
6
7 TESTDIR=$(readlink -f $(dirname $0))
8 . $TESTDIR/framework
9
10 setupenvironment
11 configarchitecture "i386"
12
13 # a "normal" package with source and binary
14 buildsimplenativepackage 'foo' 'all' '2.0'
15
16 setupaptarchive --no-update
17
18 APTARCHIVE=$(readlink -f ./aptarchive)
19 rm -f $APTARCHIVE/dists/unstable/*Release*
20
21 # update without authenticated files leads to warning
22 testequal "Ign file: unstable InRelease
23 File not found
24 Err file: unstable Release
25 File not found
26 W: The repository 'file: unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository.
27 E: Use --allow-insecure-repositories to force the update" aptget update
28
29 # no package foo
30 testequal "Listing..." apt list foo
31 testequal "partial" ls rootdir/var/lib/apt/lists
32
33 # allow override
34 testequal "Ign file: unstable InRelease
35 File not found
36 Ign file: unstable Release
37 File not found
38 Reading package lists...
39 W: The repository 'file: unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository." aptget update --allow-insecure-repositories
40 # ensure we can not install the package
41 testequal "WARNING: The following packages cannot be authenticated!
42 foo
43 E: There are problems and -y was used without --force-yes" aptget install -qq -y foo