]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-bug-407511-fail-invalid-default-release
configureable acquire targets to download additional files
[apt.git] / test / integration / test-bug-407511-fail-invalid-default-release
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture 'i386'
8
9insertpackage 'unstable' 'cool' 'all' '1.0-1'
10
11getcodenamefromsuite() {
12 if [ "$SUITE" = 'unstable' ]; then
13 echo -n 'sid'
14 else
15 echo -n "$SUITE"
16 fi
17}
18getreleaseversionfromsuite() {
19 if [ "$SUITE" = 'unstable' ]; then
20 echo -n '42.0'
21 else
22 echo -n '0.8.15'
23 fi
24}
25
26getlabelfromsuite() {
27 if [ "$SUITE" = 'unstable' ]; then
28 echo -n 'UnstableTestcases'
29 else
30 echo -n 'Testcases'
31 fi
32}
33
34setupaptarchive
35
36passdist() {
37 msgtest 'Test that target-release is accepted' $1
38 testsuccess --nomsg aptget dist-upgrade -t $1
39 msgtest 'Test that target-release pins with' $1
40 aptcache policy -t $1 | grep -q ' 990' && msgpass || msgfail
41}
42
43faildist() {
44 msgtest 'Test that target-release is refused' $1
45 testfailure --nomsg aptget dist-upgrade -t $1
46}
47
48msgtest 'Test that no default-release is active in this test' 'setup'
49aptcache policy | grep -q ' 990' && msgfall || msgpass
50
51passdist unstable
52passdist sid
53faildist sidd
54faildist stable
55passdist 42.0
56passdist 42.*
57passdist 42*
58passdist 4*.0
59faildist 21.0
60faildist 21*
61# we accept, but don't validate the following
62passdist a=unstable
63passdist n=sid
64passdist v=42.0
65passdist c=main
66passdist l=UnstableTestcases