fix(tests): Fix robot tests that failed after merging CTOR-1244

This commit is contained in:
Sophie Depassio 2025-09-01 22:57:51 +02:00 committed by sdepassio
parent 7ee422e924
commit e9d5e2fb72
5 changed files with 38 additions and 17 deletions

View 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)).*$

View File

@ -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}

View File

@ -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