mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
nuageinit: Fix tests
Commit07d17ca189set the recommended permissions for the SSH authorized keys file and directory. The tests, however, were failing on CI. Use stat to check for the proper permissions. Fixes:07d17ca189nuageinit: Set recommended SSH permissions Reported by: Jenkins
This commit is contained in:
parent
7aecd689e3
commit
8edd6c07c8
1 changed files with 2 additions and 2 deletions
|
|
@ -17,8 +17,8 @@ addsshkey_body() {
|
|||
if [ ! -f .ssh/authorized_keys ]; then
|
||||
atf_fail "ssh key not added"
|
||||
fi
|
||||
atf_check -o inline:".ssh: 040700 [drwx------ ] -> 040700 [drwx------ ]\n" chmod -vv 0700 .ssh
|
||||
atf_check -o inline:".ssh/authorized_keys: 0100600 [-rw------- ] -> 0100600 [-rw------- ]\n" chmod -vv 0600 .ssh/authorized_keys
|
||||
atf_check -o inline:"40700\n" stat -f %p .ssh
|
||||
atf_check -o inline:"100600\n" stat -f %p .ssh/authorized_keys
|
||||
atf_check -o inline:"mykey\n" cat .ssh/authorized_keys
|
||||
atf_check /usr/libexec/flua $(atf_get_srcdir)/addsshkey.lua
|
||||
atf_check -o inline:"mykey\nmykey\n" cat .ssh/authorized_keys
|
||||
|
|
|
|||
Loading…
Reference in a new issue