mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2025-12-14 19:02:45 +03:00
Add tests for passwd and hashed_passwd user-data parameters
This commit is contained in:
parent
36eef1bb14
commit
2ee4edc6e5
@ -30,6 +30,8 @@ init_tests \
|
||||
userdata_users_system \
|
||||
userdata_users_no_create_home \
|
||||
userdata_users_groups \
|
||||
userdata_users_passwd \
|
||||
userdata_users_hashed_passwd \
|
||||
userdata_users_lock_passwd \
|
||||
userdata_users_doas \
|
||||
userdata_users_ssh_authorized_keys \
|
||||
@ -384,6 +386,38 @@ userdata_users_groups_body() {
|
||||
tiny-cloud main
|
||||
}
|
||||
|
||||
userdata_users_passwd_body() {
|
||||
# first specified user will replace default user
|
||||
fake_userdata_nocloud <<-EOF
|
||||
#alpine-config
|
||||
users:
|
||||
- none
|
||||
- name: foo
|
||||
passwd: $6$foosalt$QuhZ.r54aqCAn7mTnU4jBh9LPyuVQCa8.H0dZWCMYHVaNzsPX/heqKqI3EtnB6j.YLuaENmnlEHTiwu.iVVcG1
|
||||
EOF
|
||||
atf_check -e ignore -o ignore tiny-cloud early
|
||||
atf_check \
|
||||
-e match:"userdata_users: done" \
|
||||
-o match:"chpasswd -e" \
|
||||
tiny-cloud main
|
||||
}
|
||||
|
||||
userdata_users_hashed_passwd_body() {
|
||||
# first specified user will replace default user
|
||||
fake_userdata_nocloud <<-EOF
|
||||
#alpine-config
|
||||
users:
|
||||
- none
|
||||
- name: foo
|
||||
hashed_passwd: $6$foosalt$QuhZ.r54aqCAn7mTnU4jBh9LPyuVQCa8.H0dZWCMYHVaNzsPX/heqKqI3EtnB6j.YLuaENmnlEHTiwu.iVVcG1
|
||||
EOF
|
||||
atf_check -e ignore -o ignore tiny-cloud early
|
||||
atf_check \
|
||||
-e match:"userdata_users: done" \
|
||||
-o match:"chpasswd -e" \
|
||||
tiny-cloud main
|
||||
}
|
||||
|
||||
userdata_users_lock_passwd_body() {
|
||||
# first specified user will replace default user
|
||||
fake_userdata_nocloud <<-EOF
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user