diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2022-05-19 21:24:01 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-05-19 21:24:01 +0000 |
commit | e6bf2b621d80cdf91359b8e81b173953d189e737 (patch) | |
tree | 285303c080b5edf00cf65e6960d04785222a1024 | |
parent | 4e97fb99a977c624cfb706d47bf1cbdd6413ba6e (diff) | |
download | alpine-conf-e6bf2b621d80cdf91359b8e81b173953d189e737.zip |
setup-sshd: use fake rc-service/update for testing
-rw-r--r-- | setup-sshd.in | 4 | ||||
-rwxr-xr-x | tests/setup_sshd_test | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/setup-sshd.in b/setup-sshd.in index c8df4e4..fabea69 100644 --- a/setup-sshd.in +++ b/setup-sshd.in @@ -76,8 +76,8 @@ case "$sshdchoice" in esac if [ -n "$svc" ]; then - $MOCK rc-update add $svc default - $MOCK rc-service $svc start + rc-update add $svc default + rc-service $svc start fi if [ -n "$authorized_key" -a "$authorized_key" != "none" ]; then diff --git a/tests/setup_sshd_test b/tests/setup_sshd_test index 42a34c0..6df679c 100755 --- a/tests/setup_sshd_test +++ b/tests/setup_sshd_test @@ -25,8 +25,8 @@ setup_sshd_dropbear_body() { atf_check -s exit:0 \ -e empty \ -o match:"^apk add .* dropbear" \ - -o match:"^rc-update add dropbear" \ - -o match:"^rc-service dropbear start" \ + -o match:"service dropbear added" \ + -o match:"Starting dropbear" \ setup-sshd dropbear } @@ -36,8 +36,8 @@ setup_sshd_openssh_body() { atf_check -s exit:0 \ -e empty \ -o match:"^apk add .* openssh" \ - -o match:"^rc-update add sshd" \ - -o match:"^rc-service sshd start" \ + -o match:"service sshd added" \ + -o match:"Starting sshd" \ setup-sshd -k 'https://example.com/user.keys' openssh grep 'ssh-id FOOBAR' root/.ssh/authorized_keys || atf_fail "failed to wget ssh key" } |