summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/setup_devd_test7
-rwxr-xr-xtests/setup_hostname_test7
-rwxr-xr-xtests/setup_keymap_test7
-rwxr-xr-xtests/setup_sshd_test15
4 files changed, 20 insertions, 16 deletions
diff --git a/tests/setup_devd_test b/tests/setup_devd_test
index fe61abe..d911314 100755
--- a/tests/setup_devd_test
+++ b/tests/setup_devd_test
@@ -9,6 +9,10 @@ init_env() {
# - https://github.com/jmmv/kyua/wiki/Quickstart-atf-sh-test
# - https://manned.org/atf-sh-api
+atf_init_test_cases() {
+ atf_add_test_case setup_devd_usage
+}
+
atf_test_case setup_devd_usage
setup_devd_usage_body() {
init_env
@@ -18,6 +22,3 @@ setup_devd_usage_body() {
setup-devd -h
}
-atf_init_test_cases() {
- atf_add_test_case setup_devd_usage
-}
diff --git a/tests/setup_hostname_test b/tests/setup_hostname_test
index 3a099ba..2a5943f 100755
--- a/tests/setup_hostname_test
+++ b/tests/setup_hostname_test
@@ -9,6 +9,10 @@ init_env() {
# - https://github.com/jmmv/kyua/wiki/Quickstart-atf-sh-test
# - https://manned.org/atf-sh-api
+atf_init_test_cases() {
+ atf_add_test_case setup_hostname_usage
+}
+
atf_test_case setup_hostname_usage
setup_hostname_usage_body() {
init_env
@@ -18,6 +22,3 @@ setup_hostname_usage_body() {
setup-hostname -h
}
-atf_init_test_cases() {
- atf_add_test_case setup_hostname_usage
-}
diff --git a/tests/setup_keymap_test b/tests/setup_keymap_test
index 641baf2..44c1643 100755
--- a/tests/setup_keymap_test
+++ b/tests/setup_keymap_test
@@ -9,6 +9,10 @@ init_env() {
# - https://github.com/jmmv/kyua/wiki/Quickstart-atf-sh-test
# - https://manned.org/atf-sh-api
+atf_init_test_cases() {
+ atf_add_test_case setup_keymap_usage
+}
+
atf_test_case setup_keymap_usage
setup_keymap_usage_body() {
init_env
@@ -18,6 +22,3 @@ setup_keymap_usage_body() {
setup-keymap -h
}
-atf_init_test_cases() {
- atf_add_test_case setup_keymap_usage
-}
diff --git a/tests/setup_sshd_test b/tests/setup_sshd_test
index 0dadd12..c8e9dc7 100755
--- a/tests/setup_sshd_test
+++ b/tests/setup_sshd_test
@@ -10,6 +10,14 @@ init_env() {
# - https://github.com/jmmv/kyua/wiki/Quickstart-atf-sh-test
# - https://manned.org/atf-sh-api
+atf_init_test_cases() {
+ atf_add_test_case setup_sshd_usage
+ atf_add_test_case setup_sshd_empty
+ atf_add_test_case setup_sshd_dropbear
+ atf_add_test_case setup_sshd_openssh
+ atf_add_test_case setup_sshd_interactive
+}
+
atf_test_case setup_sshd_usage
setup_sshd_usage_body() {
init_env
@@ -66,10 +74,3 @@ setup_sshd_interactive_body() {
grep '^PermitRootLogin no$' etc/ssh/sshd_config || atf_fail "did not set PermitRootLogin"
}
-atf_init_test_cases() {
- atf_add_test_case setup_sshd_usage
- atf_add_test_case setup_sshd_empty
- atf_add_test_case setup_sshd_dropbear
- atf_add_test_case setup_sshd_openssh
- atf_add_test_case setup_sshd_interactive
-}