| 1 |
*** Settings *** |
| 2 |
Documentation Check EMC DataDomain in SNMP |
| 3 |
|
| 4 |
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource |
| 5 |
|
| 6 |
Suite Setup Ctn Generic Suite Setup |
| 7 |
Test Timeout 120s |
| 8 |
|
| 9 |
|
| 10 |
*** Variables *** |
| 11 |
${CMD} ${CENTREON_PLUGINS} --plugin=storage::emc::datadomain::snmp::plugin |
| 12 |
|
| 13 |
|
| 14 |
*** Test Cases *** |
| 15 |
cleaning ${tc} |
| 16 |
[Tags] snmp storage |
| 17 |
${command} Catenate |
| 18 |
... ${CMD} |
| 19 |
... --mode=cleaning |
| 20 |
... --hostname=${HOSTNAME} |
| 21 |
... --snmp-version=${SNMPVERSION} |
| 22 |
... --snmp-port=${SNMPPORT} |
| 23 |
... --snmp-community=${snmp_community} |
| 24 |
... --snmp-timeout=5 |
| 25 |
... ${extra_options} |
| 26 |
|
| 27 |
# first run to build cache |
| 28 |
Run ${command} |
| 29 |
# second run to control the output |
| 30 |
Ctn Run Command And Check Result As Regexp ${command} ${expected_result} |
| 31 |
|
| 32 |
|
| 33 |
Examples: tc extra_options snmp_community expected_result -- |
| 34 |
... 1 ${EMPTY} storage/emc/datadomain/snmp/slim-datadomain OK: cleaning last execution: (\\\\d+[yY]] )?(\\\\d+M )?(\\\\d+w )?(\\\\d+d )?(\\\\d+h )?(\\\\d+m )?(\\\\d+s )?\\\\| 'filesystems.cleaning.execution.last.days'=\\\\d+d;;;0;$ |
| 35 |
... 2 --unit='w' storage/emc/datadomain/snmp/slim-datadomain OK: cleaning last execution: (\\\\d+[yY]] )?(\\\\d+M )?(\\\\d+w )?(\\\\d+d )?(\\\\d+h )?(\\\\d+m )?(\\\\d+s )?\\\\| 'filesystems.cleaning.execution.last.weeks'=\\\\d+w;;;0;$ |
| 36 |
... 3 --warning-last-cleaning-execution='115' storage/emc/datadomain/snmp/slim-datadomain WARNING: cleaning last execution: (\\\\d+[yY]] )?(\\\\d+M )?(\\\\d+w )?(\\\\d+d )?(\\\\d+h )?(\\\\d+m )?(\\\\d+s )?\\\\| 'filesystems.cleaning.execution.last.days'=\\\\d+d;0:115;;0; |
| 37 |
... 4 --critical-last-cleaning-execution='0' storage/emc/datadomain/snmp/slim-datadomain CRITICAL: cleaning last execution: (\\\\d+[yY]] )?(\\\\d+M )?(\\\\d+w )?(\\\\d+d )?(\\\\d+h )?(\\\\d+m )?(\\\\d+s )?\\\\| 'filesystems.cleaning.execution.last.days'=\\\\d+d;;0:0;0; |
| 38 |
... 5 ${EMPTY} storage/emc/datadomain/snmp/slim-datadomain-cleaning-running OK: cleaning last execution: running \\\\(phase 5 of 6 : copy\\\\) \\\\| 'filesystems.cleaning.execution.last.days'=0d;;;0; |
| 39 |
... 6 --timezone='Europe/Paris' storage/emc/datadomain/snmp/slim-datadomain-cleaning-ok OK: cleaning last execution: .* \\\\| 'filesystems.cleaning.execution.last.days'=\\\\d+d;;;0; |
| 40 |
... 7 --timezone='America/Los_Angeles' storage/emc/datadomain/snmp/slim-datadomain-cleaning-ok OK: cleaning last execution: .* \\\\| 'filesystems.cleaning.execution.last.days'=\\\\d+d;;;0; |
| 41 |
... 8 --timezone='bad/timezone' storage/emc/datadomain/snmp/slim-datadomain-cleaning-ok UNKNOWN: Invalid timezone provided: 'bad/timezone'. Check in /usr/share/zoneinfo for valid time zones. |