diff --git a/tests/storage/purestorage/flasharray/v2/restapi/alerts.robot b/tests/storage/purestorage/flasharray/v2/restapi/alerts.robot new file mode 100644 index 0000000000..8d02685c5d --- /dev/null +++ b/tests/storage/purestorage/flasharray/v2/restapi/alerts.robot @@ -0,0 +1,39 @@ +*** Settings *** +Documentation Check alerts. + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + +** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}mokoon.json + +${CMD} ${CENTREON_PLUGINS} +... --plugin=storage::purestorage::flasharray::v2::restapi::plugin +... --hostname=host.docker.internal +... --proto='http' +... --api-version='2.4' +... --api-token='token' +... --port=3000 +... --timeout='30' +... --insecure + +*** Test Cases *** +alerts ${tc} + [Documentation] Check + [Tags] network fortinet fortigate restapi + ${command} Catenate + ... ${CMD} + ... --mode=alerts + ... ${extra_options} + Ctn Verify Command Output ${command} ${expected_result} + + Examples: tc extra_options expected_result -- + ... 1 --verbose --help lolipop + ... 2 --verbose CRITICAL: License + ... 3 --filter-category WARNING: License + ... 4 --warning-status WARNING: License + ... 5 --critical-status CRITICAL: License + ... 6 --memory CRITICAL: License \ No newline at end of file diff --git a/tests/storage/purestorage/flasharray/v2/restapi/mokoon.json b/tests/storage/purestorage/flasharray/v2/restapi/mokoon.json new file mode 100644 index 0000000000..b4d859d69f --- /dev/null +++ b/tests/storage/purestorage/flasharray/v2/restapi/mokoon.json @@ -0,0 +1,96 @@ +{ + "uuid": "cf22c628-8819-46d3-b1b7-fc46f3aee39b", + "lastMigration": 32, + "name": "Mokoon", + "endpointPrefix": "", + "latency": 0, + "port": 3000, + "hostname": "", + "folders": [], + "routes": [ + { + "uuid": "98036266-a85e-484f-9af8-26690151180c", + "type": "http", + "documentation": "", + "method": "post", + "endpoint": "api/2.4/login", + "responses": [ + { + "uuid": "ad6920b9-8a22-4ffc-b066-936819921ba0", + "body": "{ \"created\":1733184307111, \"description\":\"(hardware:ct0.fc3): increased invalid TX word count Expected: , Actual: 2\", \"state\":\"closing\", \"component_type\":\"hardware\", \"name\":\"81088063\", \"id\":\"85198c1eda7145a788a682eea667e06b\", \"code\":45, \"severity\":\"warning\", \"category\":\"array\", \"flagged\":true, \"updated\":1733184311263, \"closed\":1733184318917, \"notified\":null, \"component_name\":\"ct0.fc3\", \"expected\":\"\", \"actual\":\"2\", \"knowledge_base_url\":\"https://support.purestorage.com/?cid=Alert_0045\", \"issue\":\"increased invalid TX word count\", \"summary\":\"(hardware:ct0.fc3): increased invalid TX word count\" }", + "latency": 0, + "statusCode": 200, + "label": "", + "headers": [], + "bodyType": "INLINE", + "filePath": "", + "databucketID": "", + "sendFileAsBody": false, + "rules": [], + "rulesOperator": "OR", + "disableTemplating": false, + "fallbackTo404": false, + "default": true, + "crudKey": "id", + "callbacks": [] + } + ], + "responseMode": null + } + ], + "rootChildren": [ + { + "type": "route", + "uuid": "98036266-a85e-484f-9af8-26690151180c" + } + ], + "proxyMode": false, + "proxyHost": "", + "proxyRemovePrefix": false, + "tlsOptions": { + "enabled": false, + "type": "CERT", + "pfxPath": "", + "certPath": "", + "keyPath": "", + "caPath": "", + "passphrase": "" + }, + "cors": true, + "headers": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS" + }, + { + "key": "Access-Control-Allow-Headers", + "value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With" + }, + { + "key": "", + "value": "" + } + ], + "proxyReqHeaders": [ + { + "key": "", + "value": "" + } + ], + "proxyResHeaders": [ + { + "key": "", + "value": "" + } + ], + "data": [], + "callbacks": [] +} \ No newline at end of file