summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/setup_sshd_test13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/setup_sshd_test b/tests/setup_sshd_test
index f6770e0..5048802 100755
--- a/tests/setup_sshd_test
+++ b/tests/setup_sshd_test
@@ -10,7 +10,8 @@ init_tests \
setup_sshd_interactive_openssh_nologin \
setup_sshd_interactive_openssh_prohibitpass \
setup_sshd_interactive_openssh_nokey \
- setup_sshd_interactive_openssh_user_exist
+ setup_sshd_interactive_openssh_user_exist \
+ setup_sshd_openssh_ssh_key
setup_sshd_usage_body() {
test_usage setup-sshd
@@ -138,3 +139,13 @@ setup_sshd_interactive_openssh_user_exist_body() {
setup-sshd < answers
}
+setup_sshd_openssh_ssh_key_body() {
+ init_env
+ SSH_KEY="ssh-rsa foobar user@example.com" atf_check -s exit:0 \
+ -o match:"apk add.*openssh" \
+ -e empty \
+ setup-sshd openssh
+ grep "ssh-rsa foobar user@example.com" root/.ssh/authorized_keys \
+ || atf_fail "did not add ssh key"
+}
+