Debian Codegraph @

tests/os/windows/snmp/uptime.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
13 *** Test Cases ***
14 uptime ${tc}
15 [Tags] os Windows
16 ${command} Catenate
17 ... ${CMD}
18 ... --plugin=os::windows::snmp::plugin
19 ... --mode=uptime
20 ... --hostname=${HOSTNAME}
21 ... --snmp-version=${SNMPVERSION}
22 ... --snmp-port=${SNMPPORT}
23 ... --snmp-community=os/windows/snmp/windows_anon
24 ... --snmp-timeout=1
25 ... ${extra_options}
26
27
28 Ctn Run Command And Check Result As Strings ${command} ${expected_result}
29
30
31 Examples: tc extra_options expected_result --
32 ... 1 --warning-uptime='2' WARNING: System uptime is: 18m 37s | 'uptime'=1117.00s;0:2;;0;
33 ... 2 --warning-uptime='1' WARNING: System uptime is: 18m 37s | 'uptime'=1117.00s;0:1;;0;
34 ... 3 --critical-uptime='2' CRITICAL: System uptime is: 18m 37s | 'uptime'=1117.00s;;0:2;0;
35 ... 4 --add-sysdesc OK: System uptime is: 18m 37s, - | 'uptime'=1117.00s;;;0;
36 ... 5 --critical-uptime='1' CRITICAL: System uptime is: 18m 37s | 'uptime'=1117.00s;;0:1;0;
37 ... 6 --check-overload OK: System uptime is: 18m 37s | 'uptime'=1117.00s;;;0;
38 ... 7 --reboot-window OK: System uptime is: 18m 37s | 'uptime'=1117.00s;;;0;
39 ... 8 --unit='h' OK: System uptime is: 18m 37s | 'uptime'=0.31h;;;0;
40 ... 9 --unit='m' OK: System uptime is: 18m 37s | 'uptime'=18.62m;;;0;
41 ... 10 --unit='s' OK: System uptime is: 18m 37s | 'uptime'=1117.00s;;;0;