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