blob: 6746277558389106b7cac123e09f81d3c2729c5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#!/usr/bin/env atf-sh
. $(atf_get_srcdir)/test_env.sh
init_tests \
setup_ntp_usage \
setup_ntp_invalid \
setup_ntp_busybox \
setup_ntp_chrony \
setup_ntp_openntpd \
setup_ntp_none \
setup_ntp_none_backwards_compat
setup_ntp_usage_body() {
test_usage setup-ntp
}
setup_ntp_invalid_body() {
init_env
atf_check -s exit:1 \
-o empty \
-e match:"is not a supported NTP client" \
setup-ntp invalid
}
setup_ntp_busybox_body() {
init_env
atf_check -s exit:0 \
-o match:"service ntpd added" \
-o match:"Starting ntpd" \
setup-ntp busybox
}
setup_ntp_chrony_body() {
init_env
atf_check -s exit:0 \
-o match:"service chronyd added" \
-o match:"Starting chronyd" \
setup-ntp chrony
}
setup_ntp_openntpd_body() {
init_env
atf_check -s exit:0 \
-o match:"service openntpd added" \
-o match:"Starting openntpd" \
setup-ntp openntpd
}
setup_ntp_none_body() {
init_env
atf_check -s exit:0 \
setup-ntp none
}
setup_ntp_none_backwards_compat_body() {
init_env
atf_check -s exit:0 \
setup-ntp -c none
}
|