summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-helper
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/test-apt-helper')
-rwxr-xr-xtest/integration/test-apt-helper7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/integration/test-apt-helper b/test/integration/test-apt-helper
index fda28968f..ae1ca7456 100755
--- a/test/integration/test-apt-helper
+++ b/test/integration/test-apt-helper
@@ -123,3 +123,10 @@ testfailureequal 'E: Must specify at least one SRV record' apthelper srv-lookup
testfailureequal 'E: GetSrvRec failed for localhost' apthelper -q=1 srv-lookup 'localhost'
testfailureequal "E: GetSrvRec failed for localhost:${APTHTTPPORT}" apthelper -q=1 srv-lookup "localhost:${APTHTTPPORT}"
testfailureequal "E: GetSrvRec failed for localhost:${APTHTTPSPORT}" apthelper -q=1 srv-lookup "localhost:${APTHTTPSPORT}"
+
+msgmsg 'apt-helper' 'drop-privs'
+testfailureequal "E: No command given to run without privileges" apthelper drop-privs
+testsuccess apthelper -- drop-privs true
+testsuccess apthelper drop-privs -- true
+DATE="$(date -u +'%Y-%m-%d')"
+testsuccessequal "$DATE" apthelper drop-privs -- date -u -d "$DATE" +'%Y-%m-%d'