From 887e331abb6ac0a850e5d53de55f43c9ebdee5a2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 25 Jan 2018 17:14:49 +0100 Subject: =?UTF-8?q?add=20apt-helper=20drop-privs=20command=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/integration/test-apt-helper | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/integration') 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' -- cgit v1.2.3