1
0
mirror of https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git synced 2025-12-15 11:22:43 +03:00

Use fake getent to avoid existing system users

The default user may or may not exist on the system running the tests.
Create a fake getent to simulate non-existing user in a consistent way.

fixes https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud/-/issues/42
This commit is contained in:
Natanael Copa 2023-05-22 11:26:38 +02:00
parent 5f26d1f579
commit 40d15db038

View File

@ -114,6 +114,10 @@ enable_sshd_body() {
}
create_default_user_body() {
fake_bin getent <<-EOF
#!/bin/sh
exit 2
EOF
atf_check \
-o match:"addgroup alpine" \
-o match:"adduser.*alpine" \