]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-update-empty-files
implement generic config fallback for methods
[apt.git] / test / integration / test-apt-update-empty-files
CommitLineData
479f6fa4
DK
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6
7setupenvironment
8configarchitecture 'amd64'
9configcompression '.' 'gz'
10
11insertpackage 'unstable' 'apt' 'amd64' '1'
12# this automatically gives us an empty Sources file
13
14setupaptarchive --no-update
15
16msgmsg 'Test with file'
17rm -rf rootdir/var/lib/apt/lists
18testsuccess apt update -o Debug::pkgAcquire::Worker=1
19cp rootdir/tmp/testsuccess.output apt.output
b2fd8524
DK
20testfailure grep '%0a\(Alt\)\?Filename:%20/.*/Sources\(\.gz\)\?%0a' apt.output
21testempty find rootdir/var/lib/apt/lists -name '*_Sources'
479f6fa4
DK
22
23msgmsg 'Test with http'
24changetowebserver
25rm -rf rootdir/var/lib/apt/lists
26testsuccess apt update -o Debug::pkgAcquire::Worker=1
b2fd8524
DK
27cp rootdir/tmp/testsuccess.output apt.output
28testfailure grep 'http:600.*Sources' apt.output
29testempty find rootdir/var/lib/apt/lists -name '*_Sources'
b58047e0
DK
30
31msgmsg 'Test lists-cleanup on newly empty'
32rm -rf rootdir/var/lib/apt/lists
33insertsource 'unstable' 'apt' 'any' '1'
34compressfile aptarchive/dists/unstable/main/source/Sources
35generatereleasefiles
36signreleasefiles
37testsuccess apt update -o Debug::pkgAcquire::Worker=1
38cp rootdir/tmp/testsuccess.output apt.output
39testsuccess grep 'http:600.*Sources' apt.output
40echo -n > aptarchive/dists/unstable/main/source/Sources
41compressfile aptarchive/dists/unstable/main/source/Sources
42generatereleasefiles 'now + 1hour'
43signreleasefiles
44testsuccess apt update -o Debug::pkgAcquire::Worker=1 -o APT::Get::List-Cleanup=0 -o Debug::Acquire::Transaction=1
45cp rootdir/tmp/testsuccess.output apt.output
46testfailure grep 'http:600.*Sources' apt.output
47testempty find rootdir/var/lib/apt/lists -name '*_Sources'