Feat: add public key to ssh to user

This commit is contained in:
2022-01-11 22:20:52 +01:00
parent eadfdd97ce
commit c61e3a7826
4 changed files with 25 additions and 5 deletions

View File

@@ -16,8 +16,16 @@ def test_create_users(host):
assert admin.shell == "/bin/bash"
assert admin.home == f"/home/{admin.name}"
def test_install_git_stow(host):
pass
def test_ssh_key(host):
user = host.user("user")
sshdir = host.file(user.home + "/.ssh")
assert not sshdir.exists
admin = host.user("admin")
sshdir = host.file(admin.home + "/.ssh")
assert sshdir.exists
autho = host.file(admin.home + "/.ssh/authorized_keys")
assert autho.contains("user1@fool")
def test_clone_dotfiles(host):
user = host.user("user")