]> git.saurik.com Git - apt.git/commitdiff
tests: use id to get user/group instead of environment
authorDavid Kalnischkies <david@kalnischkies.de>
Sat, 28 Nov 2015 00:27:49 +0000 (01:27 +0100)
committerDavid Kalnischkies <david@kalnischkies.de>
Sat, 28 Nov 2015 12:27:06 +0000 (13:27 +0100)
debci seems to have a cleaner environment now and even if not we could
never guess nogroup, so figure it out properly via 'id'.

Git-Dch: Ignore

test/integration/framework

index de8a65d7a74b930b7a4ac34cacd1d45f9fe7610c..292a7b9581e4456687f0c1fa0c1a5df6bb334ef3 100644 (file)
@@ -383,11 +383,11 @@ EOF
        confighashes 'SHA1' # these are tests, not security best-practices
 
        # create some files in /tmp and look at user/group to get what this means
-       TEST_DEFAULT_USER="$USER"
+       TEST_DEFAULT_USER="$(id -un)"
        if [ "$(uname)" = 'GNU/kFreeBSD' ]; then
                TEST_DEFAULT_GROUP='root'
        else
-               TEST_DEFAULT_GROUP="$USER"
+               TEST_DEFAULT_GROUP="$(id -gn)"
        fi
 
        # cleanup the environment a bit