]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-get-changelog
chown finished partial files earlier
[apt.git] / test / integration / test-apt-get-changelog
CommitLineData
e5837128
MV
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture "i386"
9
13845042 10buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
e5837128 11
75b09312 12setupaptarchive --no-update
13845042 13changetowebserver
75b09312 14testsuccess aptget update
e5837128 15
43acd019
DK
16# simulate normal user with non-existent root-owned directories
17rm -rf rootdir/var/cache/apt/archives/
18mkdir rootdir/var/cache/apt/archives/
19addtrap 'prefix' "chmod -f -R +w $PWD/rootdir/var/cache/apt/archives || true;"
20chmod -R -w rootdir/var/cache/apt/archives
21
75b09312 22echo 'Apt::Changelogs::Server "http://localhost:8080/";' > rootdir/etc/apt/apt.conf.d/changelog.conf
e5837128 23
03aa0847 24testequal "'http://localhost:8080/pool/apt_1.0/changelog'" aptget changelog apt --print-uris
fcb144b9 25
03aa0847
DK
26testequal "'http://localhost:8080/pool/apt_1.0/changelog'
27'http://localhost:8080/pool/apt_1.0/changelog'" aptget changelog apt apt --print-uris
28
29cd downloaded
a98b6615 30
68ba0b7f 31testsuccess aptget changelog apt -qq
03aa0847 32testfileequal '../rootdir/tmp/testsuccess.output' "$(cat ../aptarchive/pool/apt_1.0/changelog)"
72dd5bec 33
75b09312 34testsuccess aptget changelog apt -d
03aa0847
DK
35testfileequal 'apt.changelog' "$(cat ../aptarchive/pool/apt_1.0/changelog)"
36testfilestats 'apt.changelog' '%U:%G:%a' '=' "${USER}:${USER}:644"
37rm -f apt.changelog ../aptarchive/pool/apt_1.0/changelog
13845042 38
03aa0847 39testequal "$(cat ../aptarchive/pool/apt_1.0.changelog)" aptget changelog apt \
22da5c13 40 -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'
72dd5bec 41
75b09312 42testsuccess aptget changelog apt -d
03aa0847
DK
43testfileequal 'apt.changelog' "$(cat ../aptarchive/pool/apt_1.0.changelog)"
44testfilestats 'apt.changelog' '%U:%G:%a' '=' "${USER}:${USER}:644"
45rm -f apt.changelog ../aptarchive/pool/apt_1.0.changelog
13845042 46
03aa0847
DK
47testequal 'E: changelog download failed' aptget changelog apt -qq -d -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'
48testfailure test -e apt.changelog