tests: Properly set up ssh access
Allow the unprivileged `runtest` account to ssh to localhost as root.
This commit is contained in:
parent
a6f0e0a3b0
commit
ebd03582ec
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user