Skip to content

Commit

Permalink
[database::informix::snmp]:Tests - Mode(log-file-usage),Mode(list-ins…
Browse files Browse the repository at this point in the history
…tances)
  • Loading branch information
sfarouq-ext committed Dec 16, 2024
1 parent a2f4246 commit 8f03b0a
Show file tree
Hide file tree
Showing 3 changed files with 403 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/database/informix/snmp/list-instances.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
*** Settings ***
Documentation List informix instances.
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource

Test Timeout 120s

*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=database::informix::snmp::plugin

*** Test Cases ***
list-instances ${tc}
[Tags] network hp
${command} Catenate
... ${CMD}
... --mode=list-instances
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=database/informix/snmp/slim_informix-log
... --snmp-timeout=1
... ${extra_options}

Ctn Run Command And Check Result As Strings ${command} ${expected_result}

Examples: tc extra_options expected_result --
... 1 --verbose List instances: [instance = default]
... 2 --filter-instance='instance' List instances: [instance = default]
30 changes: 30 additions & 0 deletions tests/database/informix/snmp/logfile-usage.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
*** Settings ***
Documentation Check log files usage.
Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource

Test Timeout 120s

*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=database::informix::snmp::plugin

*** Test Cases ***
logfile-usage ${tc}
[Tags] network hp
${command} Catenate
... ${CMD}
... --mode=logfile-usage
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-community=database/informix/snmp/slim_informix-log
... --snmp-timeout=1
... ${extra_options}

Ctn Run Command And Check Result As Strings ${command} ${expected_result}

Examples: tc extra_options expected_result --
... 1 --verbose OK: All dbspace log files usage are ok | 'used_default.linies'=0.00%;;;0;100 'used_default.logical_log'=0.73%;;;0;100 'used_default.rootdbs'=0.00%;;;0;100 Dbspace 'default.linies' Log Files Used: 0.00% Dbspace 'default.logical_log' Log Files Used: 0.73% Dbspace 'default.rootdbs' Log Files Used: 0.00%
... 2 --filter-name='default.linies' OK: Dbspace 'default.linies' Log Files Used: 0.00% | 'used'=0.00%;;;0;100
... 3 --warning-usage=80:90 WARNING: Dbspace 'default.linies' Log Files Used: 0.00% - Dbspace 'default.logical_log' Log Files Used: 0.73% - Dbspace 'default.rootdbs' Log Files Used: 0.00% | 'used_default.linies'=0.00%;80:90;;0;100 'used_default.logical_log'=0.73%;80:90;;0;100 'used_default.rootdbs'=0.00%;80:90;;0;100
... 4 --critical-usage=80:90 CRITICAL: Dbspace 'default.linies' Log Files Used: 0.00% - Dbspace 'default.logical_log' Log Files Used: 0.73% - Dbspace 'default.rootdbs' Log Files Used: 0.00% | 'used_default.linies'=0.00%;;80:90;0;100 'used_default.logical_log'=0.73%;;80:90;0;100 'used_default.rootdbs'=0.00%;;80:90;0;100
Loading

0 comments on commit 8f03b0a

Please sign in to comment.