centreon-plugins/tests/resources/resources.resource
Lucie Dubrunfaut 27541845b8
Ctor-875 : enh(datadomain::plugin): add/rename modes (#5243)
Co-authored-by: pkippes <pkippes@centreon.com>
Co-authored-by: tuntoja <58987095+tuntoja@users.noreply.github.com>
Co-authored-by: Kevin Duret <kduret@centreon.com>
Co-authored-by: garnier-quentin <garnier.quentin@gmail.com>
Co-authored-by: sfarouq-ext <116093375+sfarouq-ext@users.noreply.github.com>
Co-authored-by: omercier <omercier@centreon.com>
2024-11-06 10:57:51 +01:00

72 lines
2.2 KiB
Plaintext

*** Settings ***
Documentation Centreon Plugins for Robot Framework
Library Process
*** Variables ***
${CENTREON_PLUGINS} perl ${CURDIR}${/}..${/}..${/}src${/}centreon_plugins.pl
# one we use package, we need to remove the "perl" part to be sure the plugin is executable and is correctly formated
# with a shebang at the top.
${HOSTNAME} 127.0.0.1
${APIPORT} 3000
${SNMPPORT} 2024
${SNMPVERSION} 2c
${PERCENT} %
*** Keywords ***
Start Mockoon
[Arguments] ${MOCKOON_JSON}
Ctn Generic Suite Setup
${process} Start Process
... mockoon-cli
... start
... --data
... ${MOCKOON_JSON}
... --port
... 3000
Sleep 10s
Stop Mockoon
Terminate All Processes
Ctn Cleanup Cache
Remove File ${/}var${/}lib${/}centreon${/}centplugins${/}*
Remove File ${/}dev${/}shm${/}*
Ctn Generic Suite Setup
Ctn Cleanup Cache
Ctn Run Command And Check Result As Regexp
[Arguments] ${command} ${expected_result}
${output} Run ${command}
${output} Strip String ${output}
Should Match Regexp
... ${output}
... ${expected_result}
... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected regular expression:\n${expected_result}\n
... values=False
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
Ctn Verify Command Output
[Arguments] ${command} ${expected_result}
${output} Run ${command}
${output} Strip String ${output}
Should Contain
... ${output}
... ${expected_result}
... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n
... values=False
... collapse_spaces=True