]> git.saurik.com Git - apt.git/blob - test/integration/test-apt-get-update-unauth-warning
test fixes
[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 Ign file: unstable Release
24 Reading package lists...
25 W: The data from 'file: unstable Release' is not signed. Packages from that repository can not be authenticated.
26 W: Use --allow-unauthenticated to force the update" aptget update
27
28 # no package foo
29 testequal "Listing..." apt list foo
30
31 # allow override
32 testequal "Ign file: unstable InRelease
33 Ign file: unstable Release
34 Reading package lists...
35 W: The data from 'file: unstable Release' is not signed. Packages from that repository can not be authenticated." aptget update --allow-unauthenticated
36
37 # ensure we can not install the package
38 testequal "WARNING: The following packages cannot be authenticated!
39 foo
40 E: There are problems and -y was used without --force-yes" aptget install -qq -y foo