summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/integration/framework14
-rwxr-xr-xtest/integration/test-apt-cdrom2
-rwxr-xr-xtest/integration/test-apt-get-changelog4
-rwxr-xr-xtest/integration/test-apt-get-source-authenticated1
-rwxr-xr-xtest/integration/test-authentication-basic4
5 files changed, 16 insertions, 9 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 191e205ce..51c7b8cae 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -272,6 +272,14 @@ setupenvironment() {
echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary
configcompression '.' 'gz' #'bz2' 'lzma' 'xz'
+ # create some files in /tmp and look at user/group to get what this means
+ TEST_DEFAULT_USER="$USER"
+ if [ "$(uname)" = 'GNU/kFreeBSD' ]; then
+ TEST_DEFAULT_GROUP='root'
+ else
+ TEST_DEFAULT_GROUP="$USER"
+ fi
+
# Acquire::AllowInsecureRepositories=false is not yet the default
# but we want it to be the default soon
configallowinsecurerepositories "false";
@@ -1428,11 +1436,11 @@ aptautotest() {
aptautotest_aptget_update() {
if ! test -d "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists"; then return; fi
- testfilestats "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt" '%U:%G:%a' '=' "${USER}:${USER}:755"
- testfilestats "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists" '%U:%G:%a' '=' "${USER}:${USER}:755"
+ testfilestats "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:755"
+ testfilestats "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:755"
# all copied files are properly chmodded
for file in $(find "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists" -maxdepth 1 -type f ! -name 'lock'); do
- testfilestats "$file" '%U:%G:%a' '=' "${USER}:${USER}:644"
+ testfilestats "$file" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
done
}
aptautotest_apt_update() { aptautotest_aptget_update "$@"; }
diff --git a/test/integration/test-apt-cdrom b/test/integration/test-apt-cdrom
index 7da645e83..7f4b3c257 100755
--- a/test/integration/test-apt-cdrom
+++ b/test/integration/test-apt-cdrom
@@ -146,5 +146,5 @@ testcdromusage
msgmsg 'Check that nothing touched our' 'CD-ROM'
for file in $(find rootdir/media/cdrom-unmounted/dists); do
- testfilestats "$file" '%U:%G:%a' '=' "${USER}:${USER}:555"
+ testfilestats "$file" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:555"
done
diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog
index 648dccf40..01f2bd393 100755
--- a/test/integration/test-apt-get-changelog
+++ b/test/integration/test-apt-get-changelog
@@ -33,7 +33,7 @@ testfileequal '../rootdir/tmp/testsuccess.output' "$(cat ../aptarchive/pool/apt_
testsuccess aptget changelog apt -d
testfileequal 'apt.changelog' "$(cat ../aptarchive/pool/apt_1.0/changelog)"
-testfilestats 'apt.changelog' '%U:%G:%a' '=' "${USER}:${USER}:644"
+testfilestats 'apt.changelog' '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
rm -f apt.changelog ../aptarchive/pool/apt_1.0/changelog
testequal "$(cat ../aptarchive/pool/apt_1.0.changelog)" aptget changelog apt \
@@ -41,7 +41,7 @@ testequal "$(cat ../aptarchive/pool/apt_1.0.changelog)" aptget changelog apt \
testsuccess aptget changelog apt -d
testfileequal 'apt.changelog' "$(cat ../aptarchive/pool/apt_1.0.changelog)"
-testfilestats 'apt.changelog' '%U:%G:%a' '=' "${USER}:${USER}:644"
+testfilestats 'apt.changelog' '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
rm -f apt.changelog ../aptarchive/pool/apt_1.0.changelog
testequal 'E: changelog download failed' aptget changelog apt -qq -d -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'
diff --git a/test/integration/test-apt-get-source-authenticated b/test/integration/test-apt-get-source-authenticated
index f68c32386..685bc566b 100755
--- a/test/integration/test-apt-get-source-authenticated
+++ b/test/integration/test-apt-get-source-authenticated
@@ -31,4 +31,3 @@ testfailure test -e foo_2.0.dsc
# allow overriding the warning
testsuccess aptget source --allow-unauthenticated foo -o Debug::pkgAcquire::Worker=1
testsuccess test -s foo_2.0.dsc -a -L foo_2.0.dsc
-testaccessrights 'foo_2.0.dsc' '777'
diff --git a/test/integration/test-authentication-basic b/test/integration/test-authentication-basic
index 21b024970..7e74726be 100755
--- a/test/integration/test-authentication-basic
+++ b/test/integration/test-authentication-basic
@@ -24,7 +24,7 @@ testauthfailure() {
testauthsuccess() {
testsuccess apthelper download-file "${1}/bash" ./downloaded/bash
testfileequal ./downloaded/bash "$(cat aptarchive/bash)"
- testfilestats ./downloaded/bash '%U:%G:%a' '=' "${USER}:${USER}:644"
+ testfilestats ./downloaded/bash '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
rm -f ./downloaded/bash
# lets see if got/retains acceptable permissions
@@ -32,7 +32,7 @@ testauthsuccess() {
if [ "$(id -u)" = '0' ]; then
testfilestats "$AUTHCONF" '%U:%G:%a' '=' "_apt:root:600"
else
- testfilestats "$AUTHCONF" '%U:%G:%a' '=' "${USER}:${USER}:600"
+ testfilestats "$AUTHCONF" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:600"
fi
fi