mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2026-02-04 12:32:45 +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:
parent
85108e958b
commit
b571e252c0
2
tests/bin/getent
Executable file
2
tests/bin/getent
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exit 2
|
||||||
@ -120,10 +120,6 @@ enable_sshd_body() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create_default_user_body() {
|
create_default_user_body() {
|
||||||
fake_bin getent <<-EOF
|
|
||||||
#!/bin/sh
|
|
||||||
exit 2
|
|
||||||
EOF
|
|
||||||
atf_check \
|
atf_check \
|
||||||
-o match:"addgroup alpine" \
|
-o match:"addgroup alpine" \
|
||||||
-o match:"adduser.*alpine" \
|
-o match:"adduser.*alpine" \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user