Debian Codegraph @

tests/storage/hp/primera/restapi/licenses.robot

raw
1 *** Settings ***
2 Documentation HPE Primera Storage REST API
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
10 *** Variables ***
11 ${MOCKOON_JSON} ${CURDIR}${/}hpe-primera.mockoon.json
12 ${HOSTNAME} 127.0.0.1
13 ${APIPORT} 3000
14 ${CMD} ${CENTREON_PLUGINS}
15 ... --plugin=storage::hp::primera::restapi::plugin
16 ... --mode=licenses
17 ... --hostname=${HOSTNAME}
18 ... --api-username=toto
19 ... --api-password=toto
20 ... --proto=http
21 ... --port=${APIPORT}
22 ... --custommode=api
23
24 *** Test Cases ***
25 Licenses ${tc}
26 [Tags] storage api hpe hp
27 ${output} Run ${CMD} ${extraoptions}
28
29 ${output} Strip String ${output}
30
31 Should Match Regexp
32 ... ${output}
33 ... ${expected_result}
34 ... Wrong output result for command:\n${CMD} ${extraoptions}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n
35 ... values=False
36
37 Examples: tc extraoptions expected_result --
38 ... 1 ${EMPTY} OK: Number of licenses: 25, Number of expired licenses: 1 - All licenses are ok \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;;;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;;;0;
39 ... 2 --critical-license-expiration=86400: CRITICAL: License 'Adaptive Flash Cache' expires: 2024-07-14. Adaptive Flash Cache license has expired. \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;;86400:;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;;86400:;0;
40 ... 3 --warning-license-expiration=86400: WARNING: License 'Adaptive Flash Cache' expires: 2024-07-14. Adaptive Flash Cache license has expired. \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;86400:;;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;86400:;;0;
41 ... 4 --warning-expired=0:0 WARNING: Number of expired licenses: 1 \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;0:0;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;;;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;;;0;
42 ... 5 --critical-license-expiration=86400: --warning-license-expiration=1296000: CRITICAL: License 'Adaptive Flash Cache' expires: 2024-07-14. Adaptive Flash Cache license has expired. \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;1296000:;86400:;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;1296000:;86400:;0;
43 ... 6 --critical-license-expiration=86400: --warning-license-expiration=86400: CRITICAL: License 'Adaptive Flash Cache' expires: 2024-07-14. Adaptive Flash Cache license has expired. \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;86400:;86400:;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;86400:;86400:;0;
44 ... 7 --critical-license-expiration=86400: --warning-license-expiration=1296000: --warning-expired=0:0 CRITICAL: License 'Adaptive Flash Cache' expires: 2024-07-14. Adaptive Flash Cache license has expired. WARNING: Number of expired licenses: 1 \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;0:0;;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;1296000:;86400:;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;1296000:;86400:;0;
45 ... 8 --critical-expired=0:0 CRITICAL: Number of expired licenses: 1 \| 'licenses.total.count'=25;;;0; 'licenses.expired.count'=1;;0:0;0;25 'Adaptive Flash Cache#Adaptive Flash Cache#license.expiration.seconds'=0s;;;0; 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;;;0;
46 ... 9 --filter-name='Autonomic Rebalance' OK: Number of licenses: 1, Number of expired licenses: 0 - License 'Autonomic Rebalance' expires: 2284-05-21. Autonomic Rebalance license expires in .*. \| 'licenses.total.count'=1;;;0; 'licenses.expired.count'=0;;;0;1 'Autonomic Rebalance#Autonomic Rebalance#license.expiration.seconds'=[0-9]+s;;;0;