Debian Codegraph @

tests/os/windows/snmp/services-fr.robot

raw
1 *** Settings ***
2 Documentation Check Windows operating systems in SNMP.
3
4 Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
5
6 Suite Setup Ctn Generic Suite Setup
7 Test Timeout 120s
8
9
10 *** Variables ***
11 ${CMD} ${CENTREON_PLUGINS}
12 ... --plugin=os::windows::snmp::plugin
13 ... --mode=service
14 ... --hostname=${HOSTNAME}
15 ... --snmp-port=${SNMPPORT}
16
17
18 *** Test Cases ***
19 Windows Services FR ${tc}
20 [Documentation] Systemd version < 248
21 [Tags] os Windows local
22 ${command} Catenate
23 ... ${CMD}
24 ... --snmp-community=os/windows/snmp/services-fr
25 ... --filter-name='${filter}'
26 ... ${extra_option}
27
28 ${output} Run ${command}
29 ${output} Strip String ${output}
30 Should Be Equal As Strings
31 ... ${output}
32 ... ${expected_result}
33 ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n\n
34
35 Examples: tc filter extra_option expected_result --
36 ... 1 ${EMPTY} ${EMPTY} OK: All services are ok | 'services.total.count'=80;;;0; 'services.active.count'=80;;;0; 'services.continue.pending.count'=0;;;0; 'services.pause.pending.count'=0;;;0; 'services.paused.count'=0;;;0;
37 ... 2 toto ${EMPTY} OK: ${SPACE}| 'services.total.count'=0;;;0; 'services.active.count'=0;;;0; 'services.continue.pending.count'=0;;;0; 'services.pause.pending.count'=0;;;0; 'services.paused.count'=0;;;0;
38 ... 3 toto --critical-active=1: CRITICAL: Number of services active: 0 | 'services.total.count'=0;;;0; 'services.active.count'=0;;1:;0; 'services.continue.pending.count'=0;;;0; 'services.pause.pending.count'=0;;;0; 'services.paused.count'=0;;;0;
39 ... 4 ${EMPTY} --critical-active=1: OK: All services are ok | 'services.total.count'=80;;;0; 'services.active.count'=80;;1:;0; 'services.continue.pending.count'=0;;;0; 'services.pause.pending.count'=0;;;0; 'services.paused.count'=0;;;0;
40 ... 5 ${EMPTY} --critical-active=1:1 CRITICAL: Number of services active: 80 | 'services.total.count'=80;;;0; 'services.active.count'=80;;1:1;0; 'services.continue.pending.count'=0;;;0; 'services.pause.pending.count'=0;;;0; 'services.paused.count'=0;;;0;
41 ... 6 .v.nement --critical-active=1: OK: All services are ok | 'services.total.count'=5;;;0; 'services.active.count'=5;;1:;0; 'services.continue.pending.count'=0;;;0; 'services.pause.pending.count'=0;;;0; 'services.paused.count'=0;;;0;
42 ... 7 \xe9v\xe9nement ${EMPTY} OK: All services are ok | 'services.total.count'=5;;;0; 'services.active.count'=5;;;0; 'services.continue.pending.count'=0;;;0; 'services.pause.pending.count'=0;;;0; 'services.paused.count'=0;;;0;
43 ... 8 SNMP ${EMPTY} OK: Service 'Service SNMP' state is 'active' [installed state: 'installed'] | 'services.total.count'=1;;;0; 'services.active.count'=1;;;0; 'services.continue.pending.count'=0;;;0; 'services.pause.pending.count'=0;;;0; 'services.paused.count'=0;;;0;