Debian Codegraph @

tests/apps/vmware/vsphere8/esx/discovery.robot

raw
1 *** Settings ***
2
3
4 Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource
5
6 Suite Setup Start Mockoon ${MOCKOON_JSON}
7 Suite Teardown Stop Mockoon
8 Test Timeout 120s
9 Test Setup Ctn Cleanup Cache
10
11
12 *** Variables ***
13 ${MOCKOON_JSON} ${CURDIR}${/}vmware8-restapi.mockoon.json
14
15 ${CMD} ${CENTREON_PLUGINS} --plugin=apps::vmware::vsphere8::esx::plugin
16 ... --password=C3POR2P2
17 ... --username=obi-wan
18 ... --mode=discovery
19 ... --hostname=127.0.0.1
20 ... --proto=http
21 ... --port=3000
22
23 *** Test Cases ***
24 Discovery ${tc}
25 [Tags] apps api vmware vsphere8 esx discovery
26 ${command} Catenate ${CMD} --http-backend=${http_backend}
27
28 # We sort the host names and keep only the last one and make sure it is the expected one
29 ${output} Run ${command} | jq -r '.results | .[].host_name' | sort | tail -1
30
31 ${output} Strip String ${output}
32 Should Be Equal As Strings
33 ... ${output}
34 ... ${expected_result}
35 ... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n
36 ... values=False
37 ... collapse_spaces=True
38
39
40 Examples: tc http_backend expected_result --
41 ... 1 curl esx3.acme.com
42 ... 2 lwp esx3.acme.com
43