From: Ian Jackson Date: Sun, 26 Dec 2021 00:47:44 +0000 (+0000) Subject: autopkgtests: Test user rc file X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=c32334186d3bbad313db26d475c186c756db67ca;p=userv.git autopkgtests: Test user rc file Signed-off-by: Ian Jackson --- diff --git a/debian/tests/control b/debian/tests/control index e5bae1e..e779eba 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -7,3 +7,8 @@ Tests: t-config Depends: @, bash, chiark-really Tests-Directory: tests Restrictions: isolation-container, allow-stderr, needs-root, breaks-testbed + +Tests: t-userconfig +Depends: @, bash, chiark-really +Tests-Directory: tests +Restrictions: isolation-container, allow-stderr, needs-root, breaks-testbed diff --git a/tests/t-userconfig b/tests/t-userconfig new file mode 100755 index 0000000..4487aa2 --- /dev/null +++ b/tests/t-userconfig @@ -0,0 +1,30 @@ +#!/bin/bash +set -ex + +. tests/lib + +prep_tmp +prep_cuser + +mkdir ~root/.userv +cat >~root/.userv/rc <"$tmp"/env + +check_expected_env "$tmp"/env + +: '---------- test rejection (wrong calling user) ----------' + +expect_output 255 '' \ +really -u daemon \ +userv root userv-t-env + + +echo ok.