summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-source-authenticated
blob: da63f7cb39be62970fe4815424dcb532b336e020 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
#
# Regression test for debian bug #749795. Ensure that we fail with
# an error if apt-get source foo will download a source that comes
# from a unauthenticated repository
#
set -e

TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework

setupenvironment
configarchitecture "i386"

# a "normal" package with source and binary
buildsimplenativepackage 'foo' 'all' '2.0'

setupaptarchive --no-update

APTARCHIVE=$(readlink -f ./aptarchive)
rm -f $APTARCHIVE/dists/unstable/*Release*

# update without authenticated InRelease file
testwarning aptget update --allow-insecure-repositories

# this all should fail
testfailure aptget install -y foo
cd downloaded
testfailure aptget source foo
testfailure test -e foo_2.0.dsc
# allow overriding the warning
testsuccess aptget source --allow-unauthenticated foo -o Debug::pkgAcquire::Worker=1
testsuccess test -s foo_2.0.dsc -a -L foo_2.0.dsc