1
0
mirror of https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git synced 2026-02-04 04:22:43 +03:00

Add a fake getent for tests

Avoid tests fail due to existing default user on system. There are more
than one test that is affected of this, so create a fake getent for all.

ref: https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud/-/issues/42
This commit is contained in:
Natanael Copa 2023-05-24 17:48:54 +02:00
parent 85108e958b
commit b571e252c0
2 changed files with 2 additions and 4 deletions

2
tests/bin/getent Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exit 2

View File

@ -120,10 +120,6 @@ 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" \