summaryrefslogtreecommitdiff
path: root/tests/setup_user_test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/setup_user_test')
-rwxr-xr-xtests/setup_user_test4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/setup_user_test b/tests/setup_user_test
index 9d660d9..2211f67 100755
--- a/tests/setup_user_test
+++ b/tests/setup_user_test
@@ -119,6 +119,8 @@ setup_user_interactive_suggest_ssh_body() {
setup-user <answers
grep -x "$WGETCONTENT" home/testuser/.ssh/authorized_keys \
|| atf_fail "ssh key not fetched from alpinelinux"
+ atf_check -o match:"^700$" \
+ stat -c "%a" home/testuser/.ssh
atf_check -o match:"^600$" \
stat -c "%a" home/testuser/.ssh/authorized_keys
}
@@ -161,6 +163,8 @@ setup_user_keys_opt_body() {
setup-user -k https://gitlab.alpinelinux.org/user.keys testuser
grep -x "$WGETCONTENT" home/testuser/.ssh/authorized_keys \
|| atf_fail "ssh key not fetched from alpinelinux"
+ atf_check -o match:"^700$" \
+ stat -c "%a" home/testuser/.ssh
atf_check -o match:"^600$" \
stat -c "%a" home/testuser/.ssh/authorized_keys
}