Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
alpine
alpine-conf
Commits
e4394175
Commit
e4394175
authored
Jun 28, 2022
by
Natanael Copa
Browse files
tests: setup-user: add test for -k opt
ref
https://gitlab.alpinelinux.org/alpine/alpine-conf/-/merge_requests/70
parent
e8b27f95
Pipeline
#126441
passed with stage
in 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/setup_user_test
View file @
e4394175
...
...
@@ -11,7 +11,8 @@ init_tests \
setup_user_interactive_suggest_ssh
\
setup_user_groups_commas
\
setup_user_groups_spaces
\
setup_user_admin
setup_user_admin
\
setup_user_keys_opt
setup_user_usage_body
()
{
test_usage setup-user
...
...
@@ -133,3 +134,15 @@ setup_user_admin_body() {
grep
wheel etc/doas.d/doas.conf
}
setup_user_keys_opt_body
()
{
init_env
export
WGETCONTENT
=
'ssh-id from alpine'
atf_check
-s
exit
:0
\
-o
match:
"adduser.* -D .*testuser"
\
setup-user
-k
https://gitlab.alpinelinux.org/user.keys testuser
grep
"
$WGETCONTENT
"
home/testuser/.ssh/authorized_keys
\
||
atf_fail
"ssh key not fetched from alpinelinux"
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment