]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-get-source-authenticated
centralize unlink checks in acquire-item
[apt.git] / test / integration / test-apt-get-source-authenticated
CommitLineData
a3f1d60c
MV
1#!/bin/sh
2#
3# Regression test for debian bug #749795. Ensure that we fail with
448c38bd 4# an error if apt-get source foo will download a source that comes
a3f1d60c
MV
5# from a unauthenticated repository
6#
7set -e
8
9TESTDIR=$(readlink -f $(dirname $0))
10. $TESTDIR/framework
11
12setupenvironment
13configarchitecture "i386"
14
15# a "normal" package with source and binary
16buildsimplenativepackage 'foo' 'all' '2.0'
17
18setupaptarchive --no-update
19
63c71412
DK
20APTARCHIVE="$(readlink -f ./aptarchive)"
21find "$APTARCHIVE/dists/unstable" -name '*Release*' -delete
a3f1d60c
MV
22
23# update without authenticated InRelease file
4fa34122 24testwarning aptget update --allow-insecure-repositories
a3f1d60c
MV
25
26# this all should fail
27testfailure aptget install -y foo
03aa0847 28cd downloaded
a3f1d60c 29testfailure aptget source foo
03aa0847 30testfailure test -e foo_2.0.dsc
a3f1d60c 31# allow overriding the warning
03aa0847
DK
32testsuccess aptget source --allow-unauthenticated foo -o Debug::pkgAcquire::Worker=1
33testsuccess test -s foo_2.0.dsc -a -L foo_2.0.dsc