Skip to content

Commit

Permalink
fix(packaging+tests): add missing modules + fix potential cache issues
Browse files Browse the repository at this point in the history
  • Loading branch information
omercier committed Nov 5, 2024
1 parent bce2757 commit a4bc2b9
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"centreon/plugins/script_custom.pm",
"centreon/plugins/script_snmp.pm",
"centreon/plugins/snmp.pm",
"snmp_standard/mode/interfaces.pm",
"snmp_standard/mode/listinterfaces.pm",
"storage/emc/datadomain/snmp/"
]
}
5 changes: 3 additions & 2 deletions tests/storage/emc/datadomain/snmp/alerts.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Documentation Check EMC DataDomain in SNMP
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource

Suite Setup Ctn Generic Suite Setup
Test Timeout 120s


Expand All @@ -12,7 +13,7 @@ ${CMD} ${CENTREON_PLUGINS} --plugin=storage::emc::datadomain::snmp::plugin

*** Test Cases ***
alerts ${tc}
[Tags] os linux
[Tags] snmp storage
${command} Catenate
... ${CMD}
... --mode=alerts
Expand All @@ -28,4 +29,4 @@ alerts ${tc}
Examples: tc extra_options expected_result --
... 1 --truly-alert='\\\%{severity} =~ /emergency|alert|warning|critical/i' OK: current alerts: 0 | 'alerts.current.count'=0;;;0;
... 2 --warning-alerts-current --critical-alerts-current OK: current alerts: 0 | 'alerts.current.count'=0;;;0;
... 3 --display-alerts OK: current alerts: 0 | 'alerts.current.count'=0;;;0;
... 3 --display-alerts OK: current alerts: 0 | 'alerts.current.count'=0;;;0;
5 changes: 3 additions & 2 deletions tests/storage/emc/datadomain/snmp/cleaning.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Documentation Check EMC DataDomain in SNMP
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource

Suite Setup Ctn Generic Suite Setup
Test Timeout 120s


Expand All @@ -12,7 +13,7 @@ ${CMD} ${CENTREON_PLUGINS} --plugin=storage::emc::datadomain::snmp::plugin

*** Test Cases ***
cleaning ${tc}
[Tags] os linux
[Tags] snmp storage
${command} Catenate
... ${CMD}
... --mode=cleaning
Expand All @@ -30,4 +31,4 @@ cleaning ${tc}
... 2 --unit='h' OK: cleaning last execution: never | 'filesystems.cleaning.execution.last.hours'=-1h;;;0;
... 3 --unit='s' OK: cleaning last execution: never | 'filesystems.cleaning.execution.last.seconds'=-1s;;;0;
... 4 --unit='w' OK: cleaning last execution: never | 'filesystems.cleaning.execution.last.weeks'=-1w;;;0;
... 5 --warning-last-cleaning-execution='' --critical-last-cleaning-execution='' OK: cleaning last execution: never | 'filesystems.cleaning.execution.last.days'=-1d;;;0;
... 5 --warning-last-cleaning-execution='' --critical-last-cleaning-execution='' OK: cleaning last execution: never | 'filesystems.cleaning.execution.last.days'=-1d;;;0;
5 changes: 3 additions & 2 deletions tests/storage/emc/datadomain/snmp/filesystems.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Documentation Check EMC DataDomain in SNMP
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource

Suite Setup Ctn Generic Suite Setup
Test Timeout 120s


Expand All @@ -12,7 +13,7 @@ ${CMD} ${CENTREON_PLUGINS} --plugin=storage::emc::datadomain::snmp::plugin

*** Test Cases ***
filesystems ${tc}
[Tags] os linux
[Tags] snmp storage
${command} Catenate
... ${CMD}
... --mode=filesystems
Expand All @@ -33,4 +34,4 @@ filesystems ${tc}
... 5 --warning-space-usage-free=0 --critical-space-usage-free=0 CRITICAL: filesystem '/ddvar' space usage total: 46.60 GB used: 10.50 GB (22.53%) free: 36.10 GB (77.47%) - filesystem '/ddvar/core' space usage total: 544.70 GB used: 102.40 MB (0.02%) free: 544.60 GB (99.98%) - filesystem 'Anonymized 056' space usage total: 82.09 TB used: 48.50 TB (59.08%) free: 33.59 TB (40.92%) - filesystem 'Anonymized 157' space usage total: 703.50 GB used: 497.30 GB (70.69%) free: 206.20 GB (29.31%) | 'filesystems.detected.count'=5;;;0; '/ddvar#filesystem.space.usage.bytes'=11274289152B;;;0;50036368998 '/ddvar#filesystem.space.free.bytes'=38762079846B;0:0;0:0;0;50036368998 '/ddvar#filesystem.space.usage.percentage'=22.53%;;;0;100 '/ddvar#filesystem.space.cleanable.bytes'=0B;;;0; '/ddvar/core#filesystem.space.usage.bytes'=107374182B;;;0;584867171532 '/ddvar/core#filesystem.space.free.bytes'=584759797350B;0:0;0:0;0;584867171532 '/ddvar/core#filesystem.space.usage.percentage'=0.02%;;;0;100 '/ddvar/core#filesystem.space.cleanable.bytes'=0B;;;0; 'Anonymized 056#filesystem.space.usage.bytes'=53328461430784B;;;0;90263462189465 'Anonymized 056#filesystem.space.free.bytes'=36935000758681B;0:0;0:0;0;90263462189465 'Anonymized 056#filesystem.space.usage.percentage'=59.08%;;;0;100 'Anonymized 056#filesystem.space.cleanable.bytes'=145169894604B;;;0; 'Anonymized 157#filesystem.space.usage.bytes'=533971809075B;;;0;755377373183 'Anonymized 157#filesystem.space.free.bytes'=221405564108B;0:0;0:0;0;755377373183 'Anonymized 157#filesystem.space.usage.percentage'=70.69%;;;0;100 'Anonymized 157#filesystem.space.cleanable.bytes'=0B;;;0; 'Anonymized 246#filesystem.space.usage.bytes'=988878746314342B;;;0;988878746314342 'Anonymized 246#filesystem.space.free.bytes'=0B;0:0;0:0;0;988878746314342 'Anonymized 246#filesystem.space.usage.percentage'=100.00%;;;0;100 'Anonymized 246#filesystem.space.cleanable.bytes'=0B;;;0;
... 6 --warning-space-usage-prct=20 --critical-space-usage-prct=80 CRITICAL: filesystem 'Anonymized 246' space usage total: 899.38 TB used: 899.38 TB (100.00%) free: 0.00 B (0.00%) WARNING: filesystem '/ddvar' space usage total: 46.60 GB used: 10.50 GB (22.53%) free: 36.10 GB (77.47%) - filesystem 'Anonymized 056' space usage total: 82.09 TB used: 48.50 TB (59.08%) free: 33.59 TB (40.92%) - filesystem 'Anonymized 157' space usage total: 703.50 GB used: 497.30 GB (70.69%) free: 206.20 GB (29.31%) | 'filesystems.detected.count'=5;;;0; '/ddvar#filesystem.space.usage.bytes'=11274289152B;;;0;50036368998 '/ddvar#filesystem.space.free.bytes'=38762079846B;;;0;50036368998 '/ddvar#filesystem.space.usage.percentage'=22.53%;0:20;0:80;0;100 '/ddvar#filesystem.space.cleanable.bytes'=0B;;;0; '/ddvar/core#filesystem.space.usage.bytes'=107374182B;;;0;584867171532 '/ddvar/core#filesystem.space.free.bytes'=584759797350B;;;0;584867171532 '/ddvar/core#filesystem.space.usage.percentage'=0.02%;0:20;0:80;0;100 '/ddvar/core#filesystem.space.cleanable.bytes'=0B;;;0; 'Anonymized 056#filesystem.space.usage.bytes'=53328461430784B;;;0;90263462189465 'Anonymized 056#filesystem.space.free.bytes'=36935000758681B;;;0;90263462189465 'Anonymized 056#filesystem.space.usage.percentage'=59.08%;0:20;0:80;0;100 'Anonymized 056#filesystem.space.cleanable.bytes'=145169894604B;;;0; 'Anonymized 157#filesystem.space.usage.bytes'=533971809075B;;;0;755377373183 'Anonymized 157#filesystem.space.free.bytes'=221405564108B;;;0;755377373183 'Anonymized 157#filesystem.space.usage.percentage'=70.69%;0:20;0:80;0;100 'Anonymized 157#filesystem.space.cleanable.bytes'=0B;;;0; 'Anonymized 246#filesystem.space.usage.bytes'=988878746314342B;;;0;988878746314342 'Anonymized 246#filesystem.space.free.bytes'=0B;;;0;988878746314342 'Anonymized 246#filesystem.space.usage.percentage'=100.00%;0:20;0:80;0;100 'Anonymized 246#filesystem.space.cleanable.bytes'=0B;;;0;
... 7 --warning-space-precompression-usage=50 --critical-space-precompression-usage=100 OK: All filesystems are ok | 'filesystems.detected.count'=5;;;0; '/ddvar#filesystem.space.usage.bytes'=11274289152B;;;0;50036368998 '/ddvar#filesystem.space.free.bytes'=38762079846B;;;0;50036368998 '/ddvar#filesystem.space.usage.percentage'=22.53%;;;0;100 '/ddvar#filesystem.space.cleanable.bytes'=0B;;;0; '/ddvar/core#filesystem.space.usage.bytes'=107374182B;;;0;584867171532 '/ddvar/core#filesystem.space.free.bytes'=584759797350B;;;0;584867171532 '/ddvar/core#filesystem.space.usage.percentage'=0.02%;;;0;100 '/ddvar/core#filesystem.space.cleanable.bytes'=0B;;;0; 'Anonymized 056#filesystem.space.usage.bytes'=53328461430784B;;;0;90263462189465 'Anonymized 056#filesystem.space.free.bytes'=36935000758681B;;;0;90263462189465 'Anonymized 056#filesystem.space.usage.percentage'=59.08%;;;0;100 'Anonymized 056#filesystem.space.cleanable.bytes'=145169894604B;;;0; 'Anonymized 157#filesystem.space.usage.bytes'=533971809075B;;;0;755377373183 'Anonymized 157#filesystem.space.free.bytes'=221405564108B;;;0;755377373183 'Anonymized 157#filesystem.space.usage.percentage'=70.69%;;;0;100 'Anonymized 157#filesystem.space.cleanable.bytes'=0B;;;0; 'Anonymized 246#filesystem.space.usage.bytes'=988878746314342B;;;0;988878746314342 'Anonymized 246#filesystem.space.free.bytes'=0B;;;0;988878746314342 'Anonymized 246#filesystem.space.usage.percentage'=100.00%;;;0;100 'Anonymized 246#filesystem.space.cleanable.bytes'=0B;;;0;
... 8 --warning-space-cleanable=80 --critical-space-cleanable=20 CRITICAL: filesystem 'Anonymized 056' space cleanable: 135.20GB | 'filesystems.detected.count'=5;;;0; '/ddvar#filesystem.space.usage.bytes'=11274289152B;;;0;50036368998 '/ddvar#filesystem.space.free.bytes'=38762079846B;;;0;50036368998 '/ddvar#filesystem.space.usage.percentage'=22.53%;;;0;100 '/ddvar#filesystem.space.cleanable.bytes'=0B;0:80;0:20;0; '/ddvar/core#filesystem.space.usage.bytes'=107374182B;;;0;584867171532 '/ddvar/core#filesystem.space.free.bytes'=584759797350B;;;0;584867171532 '/ddvar/core#filesystem.space.usage.percentage'=0.02%;;;0;100 '/ddvar/core#filesystem.space.cleanable.bytes'=0B;0:80;0:20;0; 'Anonymized 056#filesystem.space.usage.bytes'=53328461430784B;;;0;90263462189465 'Anonymized 056#filesystem.space.free.bytes'=36935000758681B;;;0;90263462189465 'Anonymized 056#filesystem.space.usage.percentage'=59.08%;;;0;100 'Anonymized 056#filesystem.space.cleanable.bytes'=145169894604B;0:80;0:20;0; 'Anonymized 157#filesystem.space.usage.bytes'=533971809075B;;;0;755377373183 'Anonymized 157#filesystem.space.free.bytes'=221405564108B;;;0;755377373183 'Anonymized 157#filesystem.space.usage.percentage'=70.69%;;;0;100 'Anonymized 157#filesystem.space.cleanable.bytes'=0B;0:80;0:20;0; 'Anonymized 246#filesystem.space.usage.bytes'=988878746314342B;;;0;988878746314342 'Anonymized 246#filesystem.space.free.bytes'=0B;;;0;988878746314342 'Anonymized 246#filesystem.space.usage.percentage'=100.00%;;;0;100 'Anonymized 246#filesystem.space.cleanable.bytes'=0B;0:80;0:20;0;
... 8 --warning-space-cleanable=80 --critical-space-cleanable=20 CRITICAL: filesystem 'Anonymized 056' space cleanable: 135.20GB | 'filesystems.detected.count'=5;;;0; '/ddvar#filesystem.space.usage.bytes'=11274289152B;;;0;50036368998 '/ddvar#filesystem.space.free.bytes'=38762079846B;;;0;50036368998 '/ddvar#filesystem.space.usage.percentage'=22.53%;;;0;100 '/ddvar#filesystem.space.cleanable.bytes'=0B;0:80;0:20;0; '/ddvar/core#filesystem.space.usage.bytes'=107374182B;;;0;584867171532 '/ddvar/core#filesystem.space.free.bytes'=584759797350B;;;0;584867171532 '/ddvar/core#filesystem.space.usage.percentage'=0.02%;;;0;100 '/ddvar/core#filesystem.space.cleanable.bytes'=0B;0:80;0:20;0; 'Anonymized 056#filesystem.space.usage.bytes'=53328461430784B;;;0;90263462189465 'Anonymized 056#filesystem.space.free.bytes'=36935000758681B;;;0;90263462189465 'Anonymized 056#filesystem.space.usage.percentage'=59.08%;;;0;100 'Anonymized 056#filesystem.space.cleanable.bytes'=145169894604B;0:80;0:20;0; 'Anonymized 157#filesystem.space.usage.bytes'=533971809075B;;;0;755377373183 'Anonymized 157#filesystem.space.free.bytes'=221405564108B;;;0;755377373183 'Anonymized 157#filesystem.space.usage.percentage'=70.69%;;;0;100 'Anonymized 157#filesystem.space.cleanable.bytes'=0B;0:80;0:20;0; 'Anonymized 246#filesystem.space.usage.bytes'=988878746314342B;;;0;988878746314342 'Anonymized 246#filesystem.space.free.bytes'=0B;;;0;988878746314342 'Anonymized 246#filesystem.space.usage.percentage'=100.00%;;;0;100 'Anonymized 246#filesystem.space.cleanable.bytes'=0B;0:80;0:20;0;
3 changes: 2 additions & 1 deletion tests/storage/emc/datadomain/snmp/hardware.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Documentation Check EMC DataDomain in SNMP
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource

Suite Setup Ctn Generic Suite Setup
Test Timeout 120s


Expand All @@ -12,7 +13,7 @@ ${CMD} ${CENTREON_PLUGINS} --plugin=storage::emc::datadomain::snmp::plugin

*** Test Cases ***
Hardware ${tc}
[Tags] os linux
[Tags] snmp storage
${command} Catenate
... ${CMD}
... --mode=hardware
Expand Down
5 changes: 3 additions & 2 deletions tests/storage/emc/datadomain/snmp/interfaces.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Documentation Check EMC DataDomain in SNMP
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource

Suite Setup Ctn Generic Suite Setup
Test Timeout 120s


Expand All @@ -12,7 +13,7 @@ ${CMD} ${CENTREON_PLUGINS} --plugin=storage::emc::datadomain::snmp::plugin

*** Test Cases ***
interfaces ${tc}
[Tags] os linux
[Tags] snmp storage
${command} Catenate
... ${CMD}
... --mode=interfaces
Expand All @@ -29,4 +30,4 @@ interfaces ${tc}
... 1 --verbose OK: All interfaces are ok Interface 'lo' Status : up (admin: up) Interface 'Anonymized 012' Status : up (admin: up) Interface 'Anonymized 118' Status : down (admin: down) Interface 'Anonymized 073' Status : down (admin: down) Interface 'Anonymized 071' Status : up (admin: up) Interface 'Anonymized 073' Status : up (admin: up) Interface 'Anonymized 232' Status : up (admin: up) Interface 'Anonymized 191' Status : up (admin: up) Interface 'Anonymized 242' Status : up (admin: up) Interface 'Anonymized 175' Status : up (admin: up) Interface 'Anonymized 128' Status : up (admin: up) Interface 'Anonymized 037' Status : down (admin: down) Interface 'Anonymized 184' Status : down (admin: down) Interface 'Anonymized 252' Status : down (admin: down) Interface 'Anonymized 012' Status : down (admin: down) Interface 'Anonymized 232' Status : up (admin: up) Interface 'Anonymized 072' Status : up (admin: up) Interface 'Anonymized 037' Status : up (admin: up)
... 2 --oid-display='ifName' OK: All interfaces are ok
... 3 --oid-extra-display='ifDesc' OK: All interfaces are ok
... 4 --display-transform-src='eth' --display-transform-dst='ens' OK: All interfaces are ok
... 4 --display-transform-src='eth' --display-transform-dst='ens' OK: All interfaces are ok
5 changes: 3 additions & 2 deletions tests/storage/emc/datadomain/snmp/list-filesystems.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Documentation Check EMC DataDomain in SNMP.
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource

Suite Setup Ctn Generic Suite Setup
Test Timeout 120s


Expand All @@ -12,7 +13,7 @@ ${CMD} ${CENTREON_PLUGINS} --plugin=storage::emc::datadomain::snmp::plugin

*** Test Cases ***
list-filesystems ${tc}
[Tags] os linux
[Tags] snmp storage
${command} Catenate
... ${CMD}
... --mode=list-filesystems
Expand All @@ -26,4 +27,4 @@ list-filesystems ${tc}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}

Examples: tc extra_options expected_result --
... 1 --verbose List filesystems: [name = /ddvar][total = 50036368998][used = 11274289152] [name = /ddvar/core][total = 584867171532][used = 107374182] [name = Anonymized 056][total = 90263462189465][used = 53328461430784] [name = Anonymized 157][total = 755377373183][used = 533971809075] [name = Anonymized 246][total = 988878746314342][used = 988878746314342]
... 1 --verbose List filesystems: [name = /ddvar][total = 50036368998][used = 11274289152] [name = /ddvar/core][total = 584867171532][used = 107374182] [name = Anonymized 056][total = 90263462189465][used = 53328461430784] [name = Anonymized 157][total = 755377373183][used = 533971809075] [name = Anonymized 246][total = 988878746314342][used = 988878746314342]
Loading

0 comments on commit a4bc2b9

Please sign in to comment.