| 1 |
*** Settings *** |
| 2 |
|
| 3 |
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource |
| 4 |
|
| 5 |
Suite Setup Start Mockoon ${MOCKOON_JSON} |
| 6 |
Suite Teardown Stop Mockoon |
| 7 |
Test Timeout 120s |
| 8 |
|
| 9 |
** Variables *** |
| 10 |
${MOCKOON_JSON} ${CURDIR}${/}mokoon.json |
| 11 |
|
| 12 |
${CMD} ${CENTREON_PLUGINS} |
| 13 |
... --plugin=storage::purestorage::flasharray::v2::restapi::plugin |
| 14 |
... --mode=alerts |
| 15 |
... --hostname=${HOSTNAME} |
| 16 |
... --proto='http' |
| 17 |
... --api-version='2.4' |
| 18 |
... --api-token='token' |
| 19 |
... --port=${APIPORT} |
| 20 |
|
| 21 |
*** Test Cases *** |
| 22 |
alerts ${tc} |
| 23 |
[Tags] storage purestorage flasharray restapi |
| 24 |
${command} Catenate |
| 25 |
... ${CMD} |
| 26 |
... ${extra_options} |
| 27 |
Ctn Verify Command Output ${command} ${expected_result} |
| 28 |
|
| 29 |
Examples: tc extra_options expected_result -- |
| 30 |
... 1 ${EMPTY} CRITICAL: 1 problem(s) detected | 'alerts.detected.count'=1;;;0; |
| 31 |
... 2 --filter-category='array' CRITICAL: 1 problem(s) detected | 'alerts.detected.count'=1;;;0; |
| 32 |
... 3 --warning-status='\\\%{component_name} eq "ct1.eth0"' --filter-category="toto" --insecure --verbose WARNING: 1 problem(s) detected | 'alerts.detected.count'=1;;;0; warning: alert [component: ct1.eth0] [severity: warning] [category: toto] [issue: failure] |
| 33 |
... 4 --critical-status='\\\%{component_name} eq "ch0" and \\\%{severity} =~ /critical/i' --filter-category="array" --insecure --verbose CRITICAL: 1 problem(s) detected | 'alerts.detected.count'=1;;;0; critical: alert [component: ch0] [severity: critical] [category: array] [issue: shelf drive failures(s)] |
| 34 |
... 5 --memory CRITICAL: 1 problem(s) detected | 'alerts.detected.count'=1;;;0; #first memory alert to be defined |
| 35 |
... 6 --memory OK: 0 problem(s) detected | 'alerts.detected.count'=0;;;0; #second check to ensure no new memory alert |