features/test/sshd/test.sh

15 lines
467 B
Bash
Raw Normal View History

2022-05-25 23:11:44 +03:00
#!/bin/bash
2022-05-13 03:07:22 +03:00
2022-05-25 23:11:44 +03:00
set -e
2022-05-13 03:07:22 +03:00
2022-05-25 23:11:44 +03:00
# Optional: Import test library
source dev-container-features-test-lib
2022-05-13 03:07:22 +03:00
check "sshd-init-exists" bash -c "ls /usr/local/share/ssh-init.sh"
check "sshd-log-exists" bash -c "ls /tmp/sshd.log"
check "sshd-log-contents" bash -c "cat /tmp/sshd.log | grep 'Starting OpenBSD Secure Shell server'"
check "sshd-log-has-sshd" bash -c "cat /tmp/sshd.log | grep 'sshd'"
check "sshd" bash -c "ps -aux | grep -v grep | grep sshd"
2022-05-13 03:07:22 +03:00
2022-05-25 23:11:44 +03:00
# Report result
reportResults