Skip to content

Commit b6d7e4f

Browse files
committed
test: add unit tests for system services
Signed-off-by: Richard Alpe <[email protected]>
1 parent cc86463 commit b6d7e4f

File tree

3 files changed

+167
-0
lines changed

3 files changed

+167
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
NAME STATUS PID DESCRIPTION
2+
udevd running 1185 Device event daemon (udev)
3+
dbus running 2248 D-Bus message bus daemon
4+
confd running 3039 Configuration daemon
5+
netopeer running 3548 NETCONF server
6+
dnsmasq running 2249 DHCP/DNS proxy
7+
tty:hvc0 running 3559 Getty on hvc0
8+
iitod running 2340 LED daemon
9+
klishd running 3560 CLI backend daemon
10+
mdns-alias running 3617 mDNS alias advertiser
11+
mstpd stopped - Spanning Tree daemon
12+
rauc running 3564 Software update service
13+
resolvconf done - Update DNS configuration
14+
statd running 3472 Status daemon
15+
staticd running 3653 Static routing daemon
16+
syslogd running 2241 System log daemon
17+
watchdogd running 2242 System watchdog daemon
18+
zebra running 3587 Zebra routing daemon
19+
mdns running 3616 Avahi mDNS-SD daemon
20+
chronyd running 3618 Chrony NTP v3/v4 daemon
21+
lldpd running 3633 LLDP daemon (IEEE 802.1ab)
22+
nginx running 3635 Web server
23+
rousette running 3636 RESTCONF server
24+
sshd running 3641 OpenSSH daemon

test/case/statd/system/operational.json

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,148 @@
8080
]
8181
}
8282
},
83+
"infix-system:services": {
84+
"service": [
85+
{
86+
"description": "Device event daemon (udev)",
87+
"name": "udevd",
88+
"pid": 1185,
89+
"status": "running"
90+
},
91+
{
92+
"description": "D-Bus message bus daemon",
93+
"name": "dbus",
94+
"pid": 2248,
95+
"status": "running"
96+
},
97+
{
98+
"description": "Configuration daemon",
99+
"name": "confd",
100+
"pid": 3039,
101+
"status": "running"
102+
},
103+
{
104+
"description": "NETCONF server",
105+
"name": "netopeer",
106+
"pid": 3548,
107+
"status": "running"
108+
},
109+
{
110+
"description": "DHCP/DNS proxy",
111+
"name": "dnsmasq",
112+
"pid": 2249,
113+
"status": "running"
114+
},
115+
{
116+
"description": "Getty on hvc0",
117+
"name": "tty:hvc0",
118+
"pid": 3559,
119+
"status": "running"
120+
},
121+
{
122+
"description": "LED daemon",
123+
"name": "iitod",
124+
"pid": 2340,
125+
"status": "running"
126+
},
127+
{
128+
"description": "CLI backend daemon",
129+
"name": "klishd",
130+
"pid": 3560,
131+
"status": "running"
132+
},
133+
{
134+
"description": "mDNS alias advertiser ",
135+
"name": "mdns-alias",
136+
"pid": 3617,
137+
"status": "running"
138+
},
139+
{
140+
"description": "Spanning Tree daemon",
141+
"name": "mstpd",
142+
"pid": 0,
143+
"status": "stopped"
144+
},
145+
{
146+
"description": "Software update service",
147+
"name": "rauc",
148+
"pid": 3564,
149+
"status": "running"
150+
},
151+
{
152+
"description": "Update DNS configuration",
153+
"name": "resolvconf",
154+
"pid": 0,
155+
"status": "done"
156+
},
157+
{
158+
"description": "Status daemon",
159+
"name": "statd",
160+
"pid": 3472,
161+
"status": "running"
162+
},
163+
{
164+
"description": "Static routing daemon",
165+
"name": "staticd",
166+
"pid": 3653,
167+
"status": "running"
168+
},
169+
{
170+
"description": "System log daemon",
171+
"name": "syslogd",
172+
"pid": 2241,
173+
"status": "running"
174+
},
175+
{
176+
"description": "System watchdog daemon",
177+
"name": "watchdogd",
178+
"pid": 2242,
179+
"status": "running"
180+
},
181+
{
182+
"description": "Zebra routing daemon",
183+
"name": "zebra",
184+
"pid": 3587,
185+
"status": "running"
186+
},
187+
{
188+
"description": "Avahi mDNS-SD daemon",
189+
"name": "mdns",
190+
"pid": 3616,
191+
"status": "running"
192+
},
193+
{
194+
"description": "Chrony NTP v3/v4 daemon",
195+
"name": "chronyd",
196+
"pid": 3618,
197+
"status": "running"
198+
},
199+
{
200+
"description": "LLDP daemon (IEEE 802.1ab)",
201+
"name": "lldpd",
202+
"pid": 3633,
203+
"status": "running"
204+
},
205+
{
206+
"description": "Web server",
207+
"name": "nginx",
208+
"pid": 3635,
209+
"status": "running"
210+
},
211+
{
212+
"description": "RESTCONF server",
213+
"name": "rousette",
214+
"pid": 3636,
215+
"status": "running"
216+
},
217+
{
218+
"description": "OpenSSH daemon",
219+
"name": "sshd",
220+
"pid": 3641,
221+
"status": "running"
222+
}
223+
]
224+
},
83225
"infix-system:software": {
84226
"boot-order": [
85227
"primary",

test/case/statd/system/test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ gen_iface=d3a
88
cli_commands="show-ntp"
99
cli_commands="$cli_commands show-software"
1010
cli_commands="$cli_commands show-hardware"
11+
cli_commands="$cli_commands show-services"
1112

1213
. $(readlink -f $(dirname $0)/../test.sh)
1314
main "$@"

0 commit comments

Comments
 (0)