mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-31 01:24:35 +02:00
Co-authored-by: May <110405507+mushroomempires@users.noreply.github.com> Co-authored-by: Paul Oureib <poureib@centreon.com> REFS: CTOR-805
34 lines
1.7 KiB
Plaintext
34 lines
1.7 KiB
Plaintext
*** Settings ***
|
|
Documentation Collections of HTTP Protocol plugin testing a mock of Centreon-web API
|
|
|
|
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource
|
|
|
|
Suite Setup Start Mockoon ${MOCKOON_JSON}
|
|
Suite Teardown Stop Mockoon
|
|
Test Timeout 120s
|
|
|
|
|
|
*** Variables ***
|
|
${MOCKOON_JSON} ${CURDIR}${/}collection-centreon-web.mockoon.json
|
|
|
|
${CMD} ${CENTREON_PLUGINS} --plugin=apps::protocols::http::plugin
|
|
... --mode collection
|
|
... --constant='hostname=${HOSTNAME}'
|
|
... --constant='protocol=http'
|
|
... --constant='port=${APIPORT}'
|
|
... --constant='username=admin'
|
|
... --constant='password=myPassword'
|
|
|
|
|
|
*** Test Cases ***
|
|
Check if ${test_desc} on Centreon
|
|
[Tags] centreon collections http
|
|
${command} Catenate
|
|
... ${CMD} --config=${CURDIR}/${collection}
|
|
Ctn Run Command And Check Result As Strings ${command} ${expected_result}
|
|
|
|
Examples: test_desc collection expected_result --
|
|
... authentication succeeds collection-centreon-web-check-auth.collection.json OK: Authentication resulted in 200 HTTP code
|
|
... hosts are down collection-centreon-web-check-down-hosts.collection.json OK: All hosts are UP | 'hostsRequest.down.count'=0;0;;0;1
|
|
... commands are broken collection-centreon-web-check-broken-commands.collection.json WARNING:${SPACE} - Service FakeHostThatIsDown/Svc-BadCommand output is '(Execute command failed)' | 'commands.broken.count'=1;0;;0;
|