mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-09-26 11:18:39 +02:00
fix(tests): Fix robot tests that failed after merging CTOR-1244
This commit is contained in:
parent
7ee422e924
commit
e9d5e2fb72
36
tests/apps/proxmox/ve/restapi/discovery.robot
Normal file
36
tests/apps/proxmox/ve/restapi/discovery.robot
Normal file
@ -0,0 +1,36 @@
|
||||
*** Settings ***
|
||||
Documentation Proxmox VE REST API Mode Discovery
|
||||
|
||||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource
|
||||
|
||||
Suite Setup Start Mockoon ${MOCKOON_JSON}
|
||||
Suite Teardown Stop Mockoon
|
||||
Test Timeout 120s
|
||||
|
||||
|
||||
*** Variables ***
|
||||
${MOCKOON_JSON} ${CURDIR}${/}proxmox.mockoon.json
|
||||
${HOSTNAME} 127.0.0.1
|
||||
${APIPORT} 3000
|
||||
${CMD} ${CENTREON_PLUGINS}
|
||||
... --plugin=apps::proxmox::ve::restapi::plugin
|
||||
... --mode discovery
|
||||
... --hostname=${HOSTNAME}
|
||||
... --api-username=xx
|
||||
... --api-password=xx
|
||||
... --proto=http
|
||||
... --port=${APIPORT}
|
||||
|
||||
*** Test Cases ***
|
||||
Discovery ${tc}
|
||||
[Tags] storage api hpe hp
|
||||
${command} Catenate
|
||||
... ${CMD}
|
||||
... ${extra_options}
|
||||
|
||||
Ctn Run Command And Check Result As Regexp ${command} ${expected_regexp}
|
||||
|
||||
Examples: tc extraoptions expected_regexp --
|
||||
... 1 ${EMPTY} "discovered_items":3
|
||||
... 2 --resource-type=vm (?=.*"ip_addresses":\\\\["123.321.123.321","127.0.0.1"\\\\])(?=.*"os_info_name":"XXXXX GNU/Linux")
|
||||
... 3 --resource-type=node ^(?!.*(ip_addresses|os_info_name)).*$
|
@ -14,6 +14,7 @@ ${HOSTNAME} 127.0.0.1
|
||||
${APIPORT} 3000
|
||||
${CMD} ${CENTREON_PLUGINS}
|
||||
... --plugin=apps::proxmox::ve::restapi::plugin
|
||||
... --mode vm-usage
|
||||
... --hostname=${HOSTNAME}
|
||||
... --api-username=xx
|
||||
... --api-password=xx
|
||||
@ -21,26 +22,10 @@ ${CMD} ${CENTREON_PLUGINS}
|
||||
... --port=${APIPORT}
|
||||
|
||||
*** Test Cases ***
|
||||
Discovery ${tc}
|
||||
[Tags] storage api hpe hp
|
||||
${command} Catenate
|
||||
... ${CMD}
|
||||
... --mode discovery
|
||||
... ${extra_options}
|
||||
|
||||
Ctn Run Command And Check Result As Regexp ${command} ${expected_regexp}
|
||||
|
||||
Examples: tc extraoptions expected_regexp --
|
||||
... 1 ${EMPTY} "discovered_items":3
|
||||
... 2 --resource-type=vm (?=.*"ip_addresses":\\\\["123.321.123.321","127.0.0.1"\\\\])(?=.*"os_info_name":"XXXXX GNU/Linux")
|
||||
... 3 --resource-type=node ^(?!.*(ip_addresses|os_info_name)).*$
|
||||
|
||||
|
||||
VmUsage ${tc}
|
||||
[Tags] storage api hpe hp
|
||||
${command} Catenate
|
||||
... ${CMD}
|
||||
... --mode vm-usage
|
||||
... ${extra_options}
|
||||
|
||||
Ctn Run Command And Check Result As Regexp ${command} ${expected_regexp}
|
@ -1,7 +1,7 @@
|
||||
*** Settings ***
|
||||
Documentation Database Mysql plugin
|
||||
|
||||
Resource ${CURDIR}${/}..${/}resources/import.resource
|
||||
Resource ${CURDIR}${/}..${/}..${/}resources/import.resource
|
||||
|
||||
Test Timeout 120s
|
||||
Suite Setup Ctn Generic Suite Setup
|
Loading…
x
Reference in New Issue
Block a user