tests: Set up root ssh access
The test needs to be able to `ssh root@localhost` to run commands on the machine directly, it doesn't just run commands through cockpit.
This commit is contained in:
parent
3d9d9a56f4
commit
0d5eac1292
@ -29,6 +29,10 @@ su -c 'echo foobar | sudo --stdin whoami' - admin
|
||||
# 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