modifiying tests
This commit is contained in:
parent
e14727b210
commit
e7a77ae09f
|
@ -0,0 +1,3 @@
|
|||
log.html
|
||||
output.xml
|
||||
report.html
|
|
@ -29,3 +29,14 @@ Start Mockoon
|
|||
|
||||
Stop Mockoon
|
||||
Terminate All Processes
|
||||
|
||||
Ctn Run Command And Check Result As Strings
|
||||
[Arguments] ${command} ${expected_result}
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${expected_result}
|
||||
... ${output}
|
||||
... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n
|
||||
... values=False
|
||||
... collapse_spaces=True
|
|
@ -27,14 +27,7 @@ Hosts ${tc}
|
|||
${command} Catenate
|
||||
... ${CMD}
|
||||
... --mode=hosts
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${expected_result}
|
||||
... ${output}
|
||||
... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n
|
||||
... values=False
|
||||
... collapse_spaces=True
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: tc snmpcommunity expected_result --
|
||||
... 1 os/linux/snmp/list-diskio OK: Hosts total: 10, failed: 0 - All hosts are ok | 'hosts.total.count'=10;;;0; 'hosts.failed.count'=0;;;0;10
|
||||
|
|
|
@ -29,14 +29,7 @@ jobs ${tc}
|
|||
... --mode=jobs
|
||||
... ${extraoptions}
|
||||
Log ${cmd}
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${expected_result}
|
||||
... ${output}
|
||||
... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n
|
||||
... values=False
|
||||
... collapse_spaces=True
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: tc extraoptions expected_result --
|
||||
... 1 --filter-name='' OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2
|
||||
|
|
|
@ -23,13 +23,7 @@ HyperV 2022 ${tc}/3
|
|||
${command} Catenate
|
||||
... ${CMD}
|
||||
... --filter-vm='${filter_vm}'
|
||||
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${expected_result}
|
||||
... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n\n
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: tc filter_vm expected_result --
|
||||
... 1 ${EMPTY} CRITICAL: 1 problem(s) detected
|
||||
|
|
|
@ -23,15 +23,11 @@ ${CMD} ${CENTREON_PLUGINS} --plugin=apps::protocols::http::plugin
|
|||
*** Test Cases ***
|
||||
Check if ${test_desc} on Centreon
|
||||
[Tags] centreon collections http
|
||||
${output} Run
|
||||
... ${CMD} --config=${CURDIR}/${collection}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${expected}
|
||||
... Wrong output result:\n\n ${output}\nInstead of:\n ${expected}\n\n
|
||||
${command} Catenate
|
||||
... ${CMD} --config=${CURDIR}/${collection}
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: test_desc collection expected --
|
||||
Examples: test_desc collection expected_result --
|
||||
... authentication succeeds collection-centreon-web-check-auth.collection.json OK: Authentication resulted in 200 HTTP code
|
||||
... hosts are down collection-centreon-web-check-down-hosts.collection.json OK: All hosts are UP | 'hostsRequest.down.count'=0;0;;0;1
|
||||
... commands are broken collection-centreon-web-check-broken-commands.collection.json WARNING:${SPACE} - Service FakeHostThatIsDown/Svc-BadCommand output is '(Execute command failed)' | 'commands.broken.count'=1;0;;0;
|
||||
|
|
|
@ -22,12 +22,7 @@ SNMP Collection - Sputnik Environment ${tc}/3
|
|||
... --snmp-community=apps/protocols/snmp/collection-sputnik
|
||||
... --config=${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}src/contrib/collection/snmp/sputnik-environment.json
|
||||
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${expected_result}
|
||||
... ${command}\nWrong output result for compliance of ${expected_result}{\n}Command output:{\n}${output}{\n}{\n}{\n}
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: tc expected_result --
|
||||
... 1 OK: Sensor '1' temperature is '20.06'°C and humidity is '33'% | '1#environment.temperature.celsius'=20.06C;;;; '1#environment.humidity.percent'=33%;;;0;100
|
||||
|
|
|
@ -16,7 +16,7 @@ ${CMD} ${CENTREON_PLUGINS} --plugin apps::protocols::snmp::plugin -
|
|||
check hashicorp vault manager${Name}
|
||||
[Documentation] Check hashicorp vaultmanager
|
||||
[Tags] snmp vault
|
||||
${cmd_hashicorp} Catenate
|
||||
${command} Catenate
|
||||
... ${CMD}
|
||||
... --pass-manager=hashicorpvault
|
||||
... --vault-address=${HOSTNAME}
|
||||
|
@ -34,15 +34,10 @@ check hashicorp vault manager${Name}
|
|||
... --format-ok='current value is: \\%{details_ok}'
|
||||
... --format-details-warning='current value is: \\%{details_warning}'
|
||||
... --format-details-critical='current value is: \\%{details_critical}'
|
||||
${output} Run
|
||||
... ${cmd_hashicorp}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${result}
|
||||
... ${cmd_hashicorp}\n\n Wrong output result for hashicorp auth manager on snmp generic plugin, output got :\n${output} \nExpected : \n ${result}\n
|
||||
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: Name path-param result --
|
||||
Examples: Name path-param expected_result --
|
||||
... default path --auth-path='' --auth-settings="password=secrethashicorpPassword" OK: current value is: Linux centreon-devbox 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64
|
||||
... wrong path --auth-path='specific-url' --auth-settings="password=secrethashicorpPassword" OK: current value is: Linux centreon-devbox 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64
|
||||
... wrong password --auth-path='' --auth-settings="password=WrongPassword" UNKNOWN: 401 Unauthorized
|
||||
|
|
|
@ -63,10 +63,6 @@ Azure PolicyInsights PolicyStates compliance
|
|||
IF ${length} > 0
|
||||
${command} Catenate ${command} --resource-type=${compliance_value.resourcetype}
|
||||
END
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${compliance_value.result}
|
||||
... Wrong output result for compliance of ${compliance_value}.{\n}Command output:{\n}${output}
|
||||
|
||||
Ctn Run Command And Check Result As Strings ${command} ${compliance_value.result}
|
||||
END
|
||||
|
|
|
@ -24,12 +24,7 @@ Avigilon camera Memory ${tc}/3
|
|||
... --warning-available='${warning_available}'
|
||||
... --critical-available='${critical_available}'
|
||||
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${expected_result}
|
||||
... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n\n
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: tc warning_available critical_available expected_result --
|
||||
... 1 ${EMPTY} ${EMPTY} OK: total system memory available: 464.85 KB | 'memory.available'=476004B;;;0;
|
||||
|
|
|
@ -25,12 +25,7 @@ Avigilon camera Storage ${tc}/3
|
|||
... --critical-status='${critical_status}'
|
||||
... --unknown-status='${unknown_status}'
|
||||
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${expected_result}
|
||||
... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n\n
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: tc warning_status critical_status unknown_status expected_result --
|
||||
... 1 ${EMPTY} ${EMPTY} ${EMPTY} OK: state of the SD card: mediaNotPresent
|
||||
|
|
|
@ -26,12 +26,7 @@ Avigilon camera Temperature ${tc}/5
|
|||
... --warning-status='${warning_status}'
|
||||
... --critical-status='${critical_status}'
|
||||
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${expected_result}
|
||||
... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n\n
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: tc warning_temperature critical_temperature warning_status critical_status expected_result --
|
||||
... 1 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: temperature: 23.00 C, sensor 1 [type:mainSensor] status: ok | 'sensor.temperature.celsius'=23C;;;0;
|
||||
|
|
|
@ -22,12 +22,7 @@ APC Sensors ${tc}/9
|
|||
${command} Append Option To Command ${command} --critical ${critical}
|
||||
${command} Append Option To Command ${command} --component ${component}
|
||||
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${expected_result}
|
||||
... Wrong output result for compliance of ${expected_result}{\n}Command output:{\n}${output}{\n}{\n}{\n}
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
# --component 'temperature' --warning='humidity,.,45:65' --critical='humidity,.,35:70'
|
||||
Examples: tc component warning critical expected_result --
|
||||
... 1 _empty_ _empty_ _empty_ OK: All 2 components are ok [2/2 temperatures]. | 'Main Module:Sonde de temperature#hardware.sensor.temperature.celsius'=23C;;;; 'Main Module:Sonde de temperature#hardware.sensor.humidity.percentage'=35%;;;0;100 'hardware.temperature.count'=2;;;;
|
||||
|
|
|
@ -33,12 +33,7 @@ Sputnik UPS - Environment ${tc}/9
|
|||
${opt} Append Option --filter-id ${filter_id}
|
||||
${command} Catenate ${command} ${opt}
|
||||
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${expected_result}
|
||||
... Wrong output result for compliance of ${expected_result}{\n}Command output:{\n}${output}{\n}{\n}{\n}
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: tc filter_id w_temperature c_temperature w_humidity c_humidity expected_result --
|
||||
... 1 1 30 50 50 70 OK: 'Sensor 1': temperature 20.06 C, humidity 33 % | 'Sensor 1#environment.temperature.celsius'=20.06C;0:30;0:50;; 'Sensor 1#environment.humidity.percentage'=33%;0:50;0:70;0;100
|
||||
|
|
|
@ -27,12 +27,7 @@ Battery ${tc}/4
|
|||
${opt} Append Option --critical-temperature ${c_temperature}
|
||||
${command} Catenate ${command} ${opt}
|
||||
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${expected_result}
|
||||
... ${command} \nWrong output result for compliance of ${expected_result}{\n}Command output:{\n}${output}{\n}{\n}{\n}
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: tc w_temperature c_temperature expected_result --
|
||||
... 1 30 50 OK: battery status is normal - charge remaining: 100% (0 minutes remaining) | 'battery.charge.remaining.percent'=100%;;;0;100 'battery.charge.remaining.minutes'=0;;;0; 'battery.voltage.volt'=339.1V;;;; 'battery.temperature.celsius'=22C;0:30;0:50;;
|
||||
|
|
|
@ -66,10 +66,5 @@ Network Aruba Instant SNMP plugin
|
|||
... --snmp-community=${ap_usage_tc.snmpcommunity}
|
||||
|
||||
Log To Console ${command}
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${ap_usage_tc.result}
|
||||
... Wrong output result for compliance of ${ap_usage_tc.result}{\n}Command output:{\n}${output}{\n}{\n}{\n}
|
||||
Ctn Run Command And Check Result As Strings ${command} ${ap_usage_tc.result}
|
||||
END
|
||||
|
|
|
@ -31,16 +31,13 @@ Create cache from API
|
|||
|
||||
Check if ${test_desc} works
|
||||
[Tags] meraki api vpn network
|
||||
${output} Run
|
||||
... ${CMD} --mode=vpn-tunnels --filter-network-name=${filter_network_name} --cache-use --critical-total-dormant=1:
|
||||
${command} Catenate
|
||||
... ${CMD}
|
||||
... --mode=vpn-tunnels --filter-network-name=${filter_network_name} --cache-use --critical-total-dormant=1:
|
||||
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${expected}
|
||||
... Wrong output result:\n\n ${output}\nInstead of:\n ${expected}\n\n
|
||||
|
||||
Examples: test_desc filter_network_name expected --
|
||||
Examples: test_desc filter_network_name expected_result --
|
||||
... all links .* OK: vpn tunnel 'C3PO-R2P2-BB88' status: dormant [mode: spoke] | 'vpn.tunnels.online.count'=0;;;0;1 'vpn.tunnels.offline.count'=0;;;0;1 'vpn.tunnels.dormant.count'=1;;1:;0;1
|
||||
... empty filter ${EMPTY} OK: vpn tunnel 'C3PO-R2P2-BB88' status: dormant [mode: spoke] | 'vpn.tunnels.online.count'=0;;;0;1 'vpn.tunnels.offline.count'=0;;;0;1 'vpn.tunnels.dormant.count'=1;;1:;0;1
|
||||
... absurd filter toto CRITICAL: Vpn tunnels dormant: 0 | 'vpn.tunnels.online.count'=0;;;0;0 'vpn.tunnels.offline.count'=0;;;0;0 'vpn.tunnels.dormant.count'=0;;1:;0;0
|
||||
|
|
|
@ -23,12 +23,7 @@ check psu components ${tc}/2
|
|||
... --component=psu
|
||||
... --alternative-status-mapping='${alternative_status_mapping}'
|
||||
|
||||
${output} Run ${command}
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${expected_result}
|
||||
... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n
|
||||
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
||||
|
||||
Examples: tc alternative_status_mapping community expected_result --
|
||||
... 1 true psu-citrix-v13 OK: All 4 components are ok [4/4 psus]. | 'count_psu'=4;;;;
|
||||
|
|
|
@ -382,14 +382,8 @@ Network Fortinet Fortigate SNMP link monitor
|
|||
... ${command}
|
||||
... --critical-packet-loss=${fortinet_fortigate_linkmonitor_test.criticalpacketloss}
|
||||
END
|
||||
${output} Run ${command}
|
||||
Log To Console . no_newline=true
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${fortinet_fortigate_linkmonitor_test.result}
|
||||
... Wrong result output for:${\n}Command: ${\n}${command}${\n}${\n}Expected output: ${\n}${fortinet_fortigate_linkmonitor_test.result}${\n}${\n}Obtained output:${\n}${output}${\n}${\n}${\n}
|
||||
... values=False
|
||||
Ctn Run Command And Check Result As Strings ${command} ${fortinet_fortigate_linkmonitor_test.result}
|
||||
END
|
||||
|
||||
Network Fortinet Fortigate SNMP list link monitor
|
||||
|
@ -421,12 +415,6 @@ Network Fortinet Fortigate SNMP list link monitor
|
|||
... ${command}
|
||||
... --filter-vdom=${fortinet_fortigate_listlinkmonitors_test.filtervdom}
|
||||
END
|
||||
${output} Run ${command}
|
||||
Log To Console . no_newline=true
|
||||
${output} Strip String ${output}
|
||||
Should Be Equal As Strings
|
||||
... ${output}
|
||||
... ${fortinet_fortigate_listlinkmonitors_test.result}
|
||||
... Wrong result output for:${\n}Command: ${\n}${command}${\n}${\n}Expected output: ${\n}${fortinet_fortigate_listlinkmonitors_test.result}${\n}${\n}Obtained output:${\n}${output}${\n}${\n}${\n}
|
||||
... values=False
|
||||
Ctn Run Command And Check Result As Strings ${command} ${fortinet_fortigate_listlinkmonitors_test.result}
|
||||
END
|
||||
|
|
Loading…
Reference in New Issue