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