From cfe35dbc01015c6927193fd5da02eaabd753989a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 7 Feb 2011 17:57:06 +0100 Subject: rename changelog and autoremove testfile to indicate better what is tested --- test/integration/test-apt-get-autoremove | 55 ++++++++++++++++++++++++++++++++ test/integration/test-apt-get-changelog | 36 +++++++++++++++++++++ test/integration/test-autoremove | 55 -------------------------------- test/integration/test-changelog | 36 --------------------- 4 files changed, 91 insertions(+), 91 deletions(-) create mode 100755 test/integration/test-apt-get-autoremove create mode 100755 test/integration/test-apt-get-changelog delete mode 100755 test/integration/test-autoremove delete mode 100755 test/integration/test-changelog (limited to 'test') diff --git a/test/integration/test-apt-get-autoremove b/test/integration/test-apt-get-autoremove new file mode 100755 index 000000000..9dfab19f5 --- /dev/null +++ b/test/integration/test-apt-get-autoremove @@ -0,0 +1,55 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +buildsimplenativepackage 'unrelated' 'all' '1' 'unstable' +buildsimplenativepackage 'po-debconf' 'all' '1.0.16' 'unstable' +buildsimplenativepackage 'debhelper' 'all' '8.0.0' 'unstable' 'Depends: po-debconf' +setupaptarchive + +aptget install unrelated debhelper -qq 2>&1 > /dev/null +testdpkginstalled 'unrelated' 'debhelper' 'po-debconf' + +testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: po-debconf +Architecture: i386 +Auto-Installed: 1 +' +aptget remove debhelper -y -qq 2>&1 > /dev/null +testdpkgnotinstalled 'debhelper' +testdpkginstalled 'po-debconf' 'unrelated' + +echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + po-debconf +0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +Remv po-debconf [1.0.16]' aptget autoremove -s +testdpkginstalled 'po-debconf' + +echo 'APT::NeverAutoRemove { "^po-debconf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove +aptget autoremove -y -qq 2>&1 > /dev/null +testdpkginstalled 'po-debconf' + +echo 'APT::NeverAutoRemove { "^po-.*$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove +aptget autoremove -y -qq 2>&1 > /dev/null +testdpkginstalled "po-debconf" + +rm rootdir/etc/apt/apt.conf.d/00autoremove +aptget autoremove -y -qq 2>&1 > /dev/null +testdpkgnotinstalled 'po-debconf' + +testfileequal 'rootdir/var/lib/apt/extended_states' '' + +sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' +testfileequal 'rootdir/var/log/apt/history.log' ' +Install: unrelated:i386 (1), debhelper:i386 (8.0.0), po-debconf:i386 (1.0.16, automatic) + +Remove: debhelper:i386 (8.0.0) + +Remove: po-debconf:i386 (1.0.16)' diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog new file mode 100755 index 000000000..0a80cc08c --- /dev/null +++ b/test/integration/test-apt-get-changelog @@ -0,0 +1,36 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture "i386" + +buildsimplenativepackage 'apt' 'all' '1.0' 'stable' + +setupaptarchive +changetowebserver +aptget update -qq + +echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf + +testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris + +aptget changelog apt -qq > apt.changelog +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" +rm apt.changelog + +aptget changelog apt -d -qq +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" +rm apt.changelog aptarchive/pool/apt_1.0/changelog + +aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' > apt.changelog +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" +rm apt.changelog + +aptget changelog apt -d -qq +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" +rm apt.changelog aptarchive/pool/apt_1.0.changelog + +testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' diff --git a/test/integration/test-autoremove b/test/integration/test-autoremove deleted file mode 100755 index 9dfab19f5..000000000 --- a/test/integration/test-autoremove +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -set -e - -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework -setupenvironment -configarchitecture 'i386' - -buildsimplenativepackage 'unrelated' 'all' '1' 'unstable' -buildsimplenativepackage 'po-debconf' 'all' '1.0.16' 'unstable' -buildsimplenativepackage 'debhelper' 'all' '8.0.0' 'unstable' 'Depends: po-debconf' -setupaptarchive - -aptget install unrelated debhelper -qq 2>&1 > /dev/null -testdpkginstalled 'unrelated' 'debhelper' 'po-debconf' - -testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: po-debconf -Architecture: i386 -Auto-Installed: 1 -' -aptget remove debhelper -y -qq 2>&1 > /dev/null -testdpkgnotinstalled 'debhelper' -testdpkginstalled 'po-debconf' 'unrelated' - -echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove -testequal 'Reading package lists... -Building dependency tree... -Reading state information... -The following packages will be REMOVED: - po-debconf -0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. -Remv po-debconf [1.0.16]' aptget autoremove -s -testdpkginstalled 'po-debconf' - -echo 'APT::NeverAutoRemove { "^po-debconf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove -aptget autoremove -y -qq 2>&1 > /dev/null -testdpkginstalled 'po-debconf' - -echo 'APT::NeverAutoRemove { "^po-.*$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove -aptget autoremove -y -qq 2>&1 > /dev/null -testdpkginstalled "po-debconf" - -rm rootdir/etc/apt/apt.conf.d/00autoremove -aptget autoremove -y -qq 2>&1 > /dev/null -testdpkgnotinstalled 'po-debconf' - -testfileequal 'rootdir/var/lib/apt/extended_states' '' - -sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -testfileequal 'rootdir/var/log/apt/history.log' ' -Install: unrelated:i386 (1), debhelper:i386 (8.0.0), po-debconf:i386 (1.0.16, automatic) - -Remove: debhelper:i386 (8.0.0) - -Remove: po-debconf:i386 (1.0.16)' diff --git a/test/integration/test-changelog b/test/integration/test-changelog deleted file mode 100755 index 0a80cc08c..000000000 --- a/test/integration/test-changelog +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -set -e - -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework - -setupenvironment -configarchitecture "i386" - -buildsimplenativepackage 'apt' 'all' '1.0' 'stable' - -setupaptarchive -changetowebserver -aptget update -qq - -echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf - -testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris - -aptget changelog apt -qq > apt.changelog -testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" -rm apt.changelog - -aptget changelog apt -d -qq -testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" -rm apt.changelog aptarchive/pool/apt_1.0/changelog - -aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' > apt.changelog -testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" -rm apt.changelog - -aptget changelog apt -d -qq -testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" -rm apt.changelog aptarchive/pool/apt_1.0.changelog - -testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' -- cgit v1.2.3