Refactor Linux SNMP DiskIO robot test to robot-example
This commit is contained in:
parent
831abe58c7
commit
2f9b1fe43a
|
@ -0,0 +1,36 @@
|
|||
*** Settings ***
|
||||
Documentation OS Linux SNMP plugin
|
||||
|
||||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource
|
||||
|
||||
Test Timeout 120s
|
||||
|
||||
|
||||
*** Variables ***
|
||||
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
|
||||
|
||||
|
||||
*** Test Cases ***
|
||||
Linux SNMP list diskio devices ${documentation} ${tc}/2
|
||||
[Tags] os linux snmp
|
||||
${command} Catenate
|
||||
... ${CMD}
|
||||
... --mode=list-diskio
|
||||
... --hostname=127.0.0.1
|
||||
... --snmp-version=2
|
||||
... --snmp-port=2024
|
||||
... --disco-show
|
||||
... --snmp-community=${snmpcommunity}
|
||||
${output} Run ${command}
|
||||
Log To Console ${command}
|
||||
${nb_results} Get Element Count
|
||||
... ${output}
|
||||
... label
|
||||
Should Be Equal As Integers
|
||||
... ${expected_result}
|
||||
... ${nb_results}
|
||||
... Wrong output result for list diskio devices: ${snmpcommunity}.{\n}Command output:{\n}${output}
|
||||
|
||||
Examples: documentation tc snmpcommunity expected_result --
|
||||
... First run 1 os/linux/snmp/list-diskio 10
|
||||
... Second run 2 os/linux/snmp/list-diskio-2 4
|
|
@ -1,45 +0,0 @@
|
|||
*** Settings ***
|
||||
Documentation OS Linux SNMP plugin
|
||||
|
||||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource
|
||||
|
||||
Test Timeout 120s
|
||||
|
||||
|
||||
*** Variables ***
|
||||
${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::snmp::plugin
|
||||
|
||||
&{list_diskio_test1}
|
||||
... snmpcommunity=os/linux/snmp/list-diskio
|
||||
... nbresults=10
|
||||
&{list_diskio_test2}
|
||||
... snmpcommunity=os/linux/snmp/list-diskio-2
|
||||
... nbresults=4
|
||||
@{list_diskio_tests}
|
||||
... &{list_diskio_test1}
|
||||
... &{list_diskio_test2}
|
||||
|
||||
|
||||
*** Test Cases ***
|
||||
Linux SNMP list diskio devices
|
||||
[Documentation] List Linux diskio devices
|
||||
[Tags] os linux snmp
|
||||
FOR ${list_diskio_test} IN @{list_diskio_tests}
|
||||
${command} Catenate
|
||||
... ${CMD}
|
||||
... --mode=list-diskio
|
||||
... --hostname=127.0.0.1
|
||||
... --snmp-version=2
|
||||
... --snmp-port=2024
|
||||
... --disco-show
|
||||
... --snmp-community=${list_diskio_test.snmpcommunity}
|
||||
${output} Run ${command}
|
||||
Log To Console ${command}
|
||||
${nb_results} Get Element Count
|
||||
... ${output}
|
||||
... label
|
||||
Should Be Equal As Integers
|
||||
... ${list_diskio_test.nbresults}
|
||||
... ${nb_results}
|
||||
... Wrong output result for list diskio devices: ${list_diskio_test}.{\n}Command output:{\n}${output}
|
||||
END
|
Loading…
Reference in New Issue