From ebd03582ece29c06e82fa60ef32cb2a7380d2b5d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sun, 14 Jun 2020 22:49:33 +0200 Subject: [PATCH] tests: Properly set up ssh access Allow the unprivileged `runtest` account to ssh to localhost as root. --- tests/verify.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/verify.sh b/tests/verify.sh index 5955e30..1179fd0 100755 --- a/tests/verify.sh +++ b/tests/verify.sh @@ -26,6 +26,10 @@ fi # create user account for running the test if ! id runtest 2>/dev/null; then useradd -c 'Test runner' runtest + # allow test to set up things on the machine + mkdir -p /root/.ssh + curl https://raw.githubusercontent.com/cockpit-project/bots/master/machine/identity.pub >> /root/.ssh/authorized_keys + chmod 600 /root/.ssh/authorized_keys fi chown -R runtest "$SOURCE"