From 77237f9fea423a686396410b65e121b555bdaf8e Mon Sep 17 00:00:00 2001 From: sfarouq-ext <116093375+sfarouq-ext@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:47:34 +0100 Subject: [PATCH] test(various): split old automated tests (#5229) Refs: CTOR-951 --- .../apps/eclipse/mosquitto/mqtt/clients.robot | 30 ++++++ .../eclipse/mosquitto/mqtt/messages.robot | 30 ++++++ .../mosquitto/mqtt/numeric-value.robot | 30 ++++++ ...osquitto-mqtt.robot => string-value.robot} | 44 --------- .../apps/eclipse/mosquitto/mqtt/uptime.robot | 30 ++++++ .../2012/local/node-integration-service.robot | 32 ++++++ ....robot => node-integration-service2.robot} | 14 --- .../kvm/avocent/acs/8000/Hardware_kvm.robot | 37 +++++++ .../kvm/avocent/acs/8000/cpu_detailed.robot | 48 +++++++++ .../hardware/kvm/avocent/acs/8000/load.robot | 38 ++++++++ .../kvm/avocent/acs/8000/memory.robot | 38 ++++++++ ...cent-acs-8000.robot => serial_ports.robot} | 55 +---------- .../local/List-Systemdservices-v219.robot | 31 ++++++ .../local/List-Systemdservices-v252.robot | 31 ++++++ .../local/os-linux-list-systemdservices.robot | 59 ----------- .../local/os-linux-system-sc-status.robot | 97 ------------------- tests/resources/spellcheck/stopwords.txt | 27 +++--- .../datacore/restapi/alert-count.robot | 33 +++++++ ...atacore-restapi.robot => pool-usage.robot} | 32 +----- .../datacore/restapi/status-monitor.robot | 29 ++++++ tests/storage/synology/snmp/Components.robot | 29 ++++++ tests/storage/synology/snmp/Uptime.robot | 30 ++++++ .../synology/snmp/storage-synology-snmp.robot | 88 ----------------- 23 files changed, 510 insertions(+), 402 deletions(-) create mode 100644 tests/apps/eclipse/mosquitto/mqtt/clients.robot create mode 100644 tests/apps/eclipse/mosquitto/mqtt/messages.robot create mode 100644 tests/apps/eclipse/mosquitto/mqtt/numeric-value.robot rename tests/apps/eclipse/mosquitto/mqtt/{eclipse-mosquitto-mqtt.robot => string-value.robot} (50%) create mode 100644 tests/apps/eclipse/mosquitto/mqtt/uptime.robot create mode 100644 tests/apps/microsoft/hyperv/2012/local/node-integration-service.robot rename tests/apps/microsoft/hyperv/2012/local/{nodeintegrationservice.robot => node-integration-service2.robot} (62%) create mode 100644 tests/hardware/kvm/avocent/acs/8000/Hardware_kvm.robot create mode 100644 tests/hardware/kvm/avocent/acs/8000/cpu_detailed.robot create mode 100644 tests/hardware/kvm/avocent/acs/8000/load.robot create mode 100644 tests/hardware/kvm/avocent/acs/8000/memory.robot rename tests/hardware/kvm/avocent/acs/8000/{hardware-kvm-avocent-acs-8000.robot => serial_ports.robot} (52%) create mode 100644 tests/os/linux/local/List-Systemdservices-v219.robot create mode 100644 tests/os/linux/local/List-Systemdservices-v252.robot delete mode 100644 tests/os/linux/local/os-linux-list-systemdservices.robot delete mode 100644 tests/os/linux/local/os-linux-system-sc-status.robot create mode 100644 tests/storage/datacore/restapi/alert-count.robot rename tests/storage/datacore/restapi/{storage-datacore-restapi.robot => pool-usage.robot} (53%) create mode 100644 tests/storage/datacore/restapi/status-monitor.robot create mode 100644 tests/storage/synology/snmp/Components.robot create mode 100644 tests/storage/synology/snmp/Uptime.robot delete mode 100644 tests/storage/synology/snmp/storage-synology-snmp.robot diff --git a/tests/apps/eclipse/mosquitto/mqtt/clients.robot b/tests/apps/eclipse/mosquitto/mqtt/clients.robot new file mode 100644 index 000000000..bf06db72c --- /dev/null +++ b/tests/apps/eclipse/mosquitto/mqtt/clients.robot @@ -0,0 +1,30 @@ +*** Settings *** +Documentation Eclipse Mosquitto MQTT plugin tests + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + +Keyword Tags notauto + + +*** Variables *** +${HOSTNAME} mosquitto_openssl +${MQTT_PORT} 8883 +${MQTT_CA_CERTIFICATE} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/ca.crt +${MQTT_SSL_CERTIFICATE} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/client.crt +${MQTT_SSL_KEY} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/client.key +${CMD} ${CENTREON_PLUGINS} --plugin=apps::eclipse::mosquitto::mqtt::plugin --hostname=${HOSTNAME} --mqtt-port=${MQTT_PORT} --mqtt-ca-certificate=${MQTT_CA_CERTIFICATE} --mqtt-ssl-certificate=${MQTT_SSL_CERTIFICATE} --mqtt-ssl-key=${MQTT_SSL_KEY} + + +*** Test Cases *** +Mosquitto MQTT clients + [Documentation] Check Mosquitto MQTT uptime + [Tags] eclipse mosquitto mqtt + ${command} Catenate + ... ${CMD} + ... --mode=clients + ... --help + + ${output} Run ${command} + ${output} Strip String ${output} \ No newline at end of file diff --git a/tests/apps/eclipse/mosquitto/mqtt/messages.robot b/tests/apps/eclipse/mosquitto/mqtt/messages.robot new file mode 100644 index 000000000..8addc34ae --- /dev/null +++ b/tests/apps/eclipse/mosquitto/mqtt/messages.robot @@ -0,0 +1,30 @@ +*** Settings *** +Documentation Eclipse Mosquitto MQTT plugin tests + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + +Keyword Tags notauto + + +*** Variables *** +${HOSTNAME} mosquitto_openssl +${MQTT_PORT} 8883 +${MQTT_CA_CERTIFICATE} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/ca.crt +${MQTT_SSL_CERTIFICATE} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/client.crt +${MQTT_SSL_KEY} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/client.key +${CMD} ${CENTREON_PLUGINS} --plugin=apps::eclipse::mosquitto::mqtt::plugin --hostname=${HOSTNAME} --mqtt-port=${MQTT_PORT} --mqtt-ca-certificate=${MQTT_CA_CERTIFICATE} --mqtt-ssl-certificate=${MQTT_SSL_CERTIFICATE} --mqtt-ssl-key=${MQTT_SSL_KEY} + + +*** Test Cases *** +Mosquitto MQTT messages + [Documentation] Check Mosquitto MQTT uptime + [Tags] eclipse mosquitto mqtt + ${command} Catenate + ... ${CMD} + ... --mode=messages + ... --help + + ${output} Run ${command} + ${output} Strip String ${output} \ No newline at end of file diff --git a/tests/apps/eclipse/mosquitto/mqtt/numeric-value.robot b/tests/apps/eclipse/mosquitto/mqtt/numeric-value.robot new file mode 100644 index 000000000..6209ed6d6 --- /dev/null +++ b/tests/apps/eclipse/mosquitto/mqtt/numeric-value.robot @@ -0,0 +1,30 @@ +*** Settings *** +Documentation Eclipse Mosquitto MQTT plugin tests + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + +Keyword Tags notauto + + +*** Variables *** +${HOSTNAME} mosquitto_openssl +${MQTT_PORT} 8883 +${MQTT_CA_CERTIFICATE} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/ca.crt +${MQTT_SSL_CERTIFICATE} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/client.crt +${MQTT_SSL_KEY} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/client.key +${CMD} ${CENTREON_PLUGINS} --plugin=apps::eclipse::mosquitto::mqtt::plugin --hostname=${HOSTNAME} --mqtt-port=${MQTT_PORT} --mqtt-ca-certificate=${MQTT_CA_CERTIFICATE} --mqtt-ssl-certificate=${MQTT_SSL_CERTIFICATE} --mqtt-ssl-key=${MQTT_SSL_KEY} + + +*** Test Cases *** +Mosquitto MQTT numeric-value + [Documentation] Check Mosquitto MQTT uptime + [Tags] eclipse mosquitto mqtt + ${command} Catenate + ... ${CMD} + ... --mode=numeric-value + ... --help + + ${output} Run ${command} + ${output} Strip String ${output} \ No newline at end of file diff --git a/tests/apps/eclipse/mosquitto/mqtt/eclipse-mosquitto-mqtt.robot b/tests/apps/eclipse/mosquitto/mqtt/string-value.robot similarity index 50% rename from tests/apps/eclipse/mosquitto/mqtt/eclipse-mosquitto-mqtt.robot rename to tests/apps/eclipse/mosquitto/mqtt/string-value.robot index 3109cc677..179f96832 100644 --- a/tests/apps/eclipse/mosquitto/mqtt/eclipse-mosquitto-mqtt.robot +++ b/tests/apps/eclipse/mosquitto/mqtt/string-value.robot @@ -18,50 +18,6 @@ ${CMD} ${CENTREON_PLUGINS} --plugin=apps::eclipse::mosquitt *** Test Cases *** -Mosquitto MQTT uptime - [Documentation] Check Mosquitto MQTT uptime - [Tags] eclipse mosquitto mqtt - ${command} Catenate - ... ${CMD} - ... --mode=uptime - ... --help - - ${output} Run ${command} - ${output} Strip String ${output} - -Mosquitto MQTT clients - [Documentation] Check Mosquitto MQTT uptime - [Tags] eclipse mosquitto mqtt - ${command} Catenate - ... ${CMD} - ... --mode=clients - ... --help - - ${output} Run ${command} - ${output} Strip String ${output} - -Mosquitto MQTT messages - [Documentation] Check Mosquitto MQTT uptime - [Tags] eclipse mosquitto mqtt - ${command} Catenate - ... ${CMD} - ... --mode=messages - ... --help - - ${output} Run ${command} - ${output} Strip String ${output} - -Mosquitto MQTT numeric-value - [Documentation] Check Mosquitto MQTT uptime - [Tags] eclipse mosquitto mqtt - ${command} Catenate - ... ${CMD} - ... --mode=numeric-value - ... --help - - ${output} Run ${command} - ${output} Strip String ${output} - Mosquitto MQTT string-value [Documentation] Check Mosquitto MQTT uptime [Tags] eclipse mosquitto mqtt diff --git a/tests/apps/eclipse/mosquitto/mqtt/uptime.robot b/tests/apps/eclipse/mosquitto/mqtt/uptime.robot new file mode 100644 index 000000000..b95b08211 --- /dev/null +++ b/tests/apps/eclipse/mosquitto/mqtt/uptime.robot @@ -0,0 +1,30 @@ +*** Settings *** +Documentation Eclipse Mosquitto MQTT plugin tests + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + +Keyword Tags notauto + + +*** Variables *** +${HOSTNAME} mosquitto_openssl +${MQTT_PORT} 8883 +${MQTT_CA_CERTIFICATE} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/ca.crt +${MQTT_SSL_CERTIFICATE} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/client.crt +${MQTT_SSL_KEY} /home/code/tests/robot/apps/eclipse/mosquitto/mqtt/certs/client.key +${CMD} ${CENTREON_PLUGINS} --plugin=apps::eclipse::mosquitto::mqtt::plugin --hostname=${HOSTNAME} --mqtt-port=${MQTT_PORT} --mqtt-ca-certificate=${MQTT_CA_CERTIFICATE} --mqtt-ssl-certificate=${MQTT_SSL_CERTIFICATE} --mqtt-ssl-key=${MQTT_SSL_KEY} + + +*** Test Cases *** +Mosquitto MQTT uptime + [Documentation] Check Mosquitto MQTT uptime + [Tags] eclipse mosquitto mqtt + ${command} Catenate + ... ${CMD} + ... --mode=uptime + ... --help + + ${output} Run ${command} + ${output} Strip String ${output} \ No newline at end of file diff --git a/tests/apps/microsoft/hyperv/2012/local/node-integration-service.robot b/tests/apps/microsoft/hyperv/2012/local/node-integration-service.robot new file mode 100644 index 000000000..11d211ce7 --- /dev/null +++ b/tests/apps/microsoft/hyperv/2012/local/node-integration-service.robot @@ -0,0 +1,32 @@ +*** Settings *** +Documentation Application Microsoft HyperV 2022 + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + + +*** Variables *** +${CMD} ${CENTREON_PLUGINS} +... --plugin=apps::microsoft::hyperv::2012::local::plugin +... --mode=node-integration-service +... --command=cat +... --command-path=/usr/bin +... --no-ps + + +*** Test Cases *** +HyperV 2022-1 ${tc} + [Documentation] Apps Microsoft HyperV 2022 + [Tags] applications microsoft hyperv virtualization + ${command} Catenate + ... ${CMD} + ... --command-options=${CURDIR}/nodeintegrationservice-2022-1.json + ... --filter-vm='${filter_vm}' + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc filter_vm expected_result -- + ... 1 ${EMPTY} CRITICAL: 1 problem(s) detected + ... 2 VSERVER05 OK: VM 'VSERVER05' 0 problem(s) detected - VM 'VSERVER05' 0 problem(s) detected + ... 3 VSERVER07 CRITICAL: VM 'VSERVER07' 1 problem(s) detected \ No newline at end of file diff --git a/tests/apps/microsoft/hyperv/2012/local/nodeintegrationservice.robot b/tests/apps/microsoft/hyperv/2012/local/node-integration-service2.robot similarity index 62% rename from tests/apps/microsoft/hyperv/2012/local/nodeintegrationservice.robot rename to tests/apps/microsoft/hyperv/2012/local/node-integration-service2.robot index 656d11eaf..97cc3d21a 100644 --- a/tests/apps/microsoft/hyperv/2012/local/nodeintegrationservice.robot +++ b/tests/apps/microsoft/hyperv/2012/local/node-integration-service2.robot @@ -16,20 +16,6 @@ ${CMD} ${CENTREON_PLUGINS} *** Test Cases *** -HyperV 2022-1 ${tc} - [Documentation] Apps Microsoft HyperV 2022 - [Tags] applications microsoft hyperv virtualization - ${command} Catenate - ... ${CMD} - ... --command-options=${CURDIR}/nodeintegrationservice-2022-1.json - ... --filter-vm='${filter_vm}' - - Ctn Run Command And Check Result As Strings ${command} ${expected_result} - - Examples: tc filter_vm expected_result -- - ... 1 ${EMPTY} CRITICAL: 1 problem(s) detected - ... 2 VSERVER05 OK: VM 'VSERVER05' 0 problem(s) detected - VM 'VSERVER05' 0 problem(s) detected - ... 3 VSERVER07 CRITICAL: VM 'VSERVER07' 1 problem(s) detected HyperV 2022-2 ${tc} [Documentation] Apps Microsoft HyperV 2022 [Tags] applications microsoft hyperv virtualization diff --git a/tests/hardware/kvm/avocent/acs/8000/Hardware_kvm.robot b/tests/hardware/kvm/avocent/acs/8000/Hardware_kvm.robot new file mode 100644 index 000000000..0f9f2e821 --- /dev/null +++ b/tests/hardware/kvm/avocent/acs/8000/Hardware_kvm.robot @@ -0,0 +1,37 @@ +*** Settings *** +Documentation hardware mode +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + + +*** Variables *** +${SNMPCOMMUNITY} hardware/kvm/avocent/acs/8000/avocent8000 + + +*** Test Cases *** +Hardware + [Tags] hardware kvm avocent hardware-mode snmp + ${output} Run Avocent 8000 Plugin "hardware" "" + + ${output} Strip String ${output} + Should Be Equal As Strings + ... ${output} + ... OK: All 2 components are ok [2/2 psus]. | 'hardware.psu.count'=2;;;; + ... Wrong output result for command:{\n}${output}{\n}{\n}{\n} + +*** Keywords *** +Run Avocent 8000 Plugin + [Arguments] ${mode} ${extraoptions} + ${command} Catenate + ... ${CENTREON_PLUGINS} + ... --plugin=hardware::kvm::avocent::acs::8000::snmp::plugin + ... --mode=${mode} + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} + ... --snmp-community=${SNMPCOMMUNITY} + ... ${extraoptions} + + ${output} Run ${command} + RETURN ${output} \ No newline at end of file diff --git a/tests/hardware/kvm/avocent/acs/8000/cpu_detailed.robot b/tests/hardware/kvm/avocent/acs/8000/cpu_detailed.robot new file mode 100644 index 000000000..bb719d7fa --- /dev/null +++ b/tests/hardware/kvm/avocent/acs/8000/cpu_detailed.robot @@ -0,0 +1,48 @@ +*** Settings *** +Documentation cpu-detailed mode + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + + +*** Variables *** +${SNMPCOMMUNITY} hardware/kvm/avocent/acs/8000/avocent8000 + + +*** Test Cases *** +Cpu-Detailed + [Tags] hardware kvm avocent cpu snmp + Remove File /dev/shm/snmpstandard_127.0.0.1_2024_cpu-detailed* + ${output} Run Avocent 8000 Plugin "cpu-detailed" --statefile-dir=/dev/shm/ + ${output} Strip String ${output} + Should Be Equal As Strings + ... ${output} + ... OK: CPU Usage: user : Buffer creation, nice : Buffer creation, system : Buffer creation, idle : Buffer creation, wait : Buffer creation, kernel : Buffer creation, interrupt : Buffer creation, softirq : Buffer creation, steal : Buffer creation, guest : Buffer creation, guestnice : Buffer creation + ... Wrong output result for command:{\n}${output}{\n}{\n}{\n} + + ${output} Run Avocent 8000 Plugin "cpu-detailed" --statefile-dir=/dev/shm/ + ${output} Strip String ${output} + Remove File /dev/shm/snmpstandard_127.0.0.1_2024_cpu-detailed* + Should Be Equal As Strings + ... ${output} + ... OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved + ... Wrong output result for command:{\n}${output}{\n}{\n}{\n} + + + +*** Keywords *** +Run Avocent 8000 Plugin + [Arguments] ${mode} ${extraoptions} + ${command} Catenate + ... ${CENTREON_PLUGINS} + ... --plugin=hardware::kvm::avocent::acs::8000::snmp::plugin + ... --mode=${mode} + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} + ... --snmp-community=${SNMPCOMMUNITY} + ... ${extraoptions} + + ${output} Run ${command} + RETURN ${output} diff --git a/tests/hardware/kvm/avocent/acs/8000/load.robot b/tests/hardware/kvm/avocent/acs/8000/load.robot new file mode 100644 index 000000000..c90b715da --- /dev/null +++ b/tests/hardware/kvm/avocent/acs/8000/load.robot @@ -0,0 +1,38 @@ +*** Settings *** +Documentation load mode + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + + +*** Variables *** +${SNMPCOMMUNITY} hardware/kvm/avocent/acs/8000/avocent8000 + + +*** Test Cases *** +Load + [Tags] hardware kvm avocent load snmp + ${output} Run Avocent 8000 Plugin "load" "" + + ${output} Strip String ${output} + Should Be Equal As Strings + ... ${output} + ... OK: Load average: 0.04, 0.10, 0.15 | 'load1'=0.04;;;0; 'load5'=0.10;;;0; 'load15'=0.15;;;0; + ... Wrong output result for command:{\n}${output}{\n}{\n}{\n} + +*** Keywords *** +Run Avocent 8000 Plugin + [Arguments] ${mode} ${extraoptions} + ${command} Catenate + ... ${CENTREON_PLUGINS} + ... --plugin=hardware::kvm::avocent::acs::8000::snmp::plugin + ... --mode=${mode} + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} + ... --snmp-community=${SNMPCOMMUNITY} + ... ${extraoptions} + + ${output} Run ${command} + RETURN ${output} diff --git a/tests/hardware/kvm/avocent/acs/8000/memory.robot b/tests/hardware/kvm/avocent/acs/8000/memory.robot new file mode 100644 index 000000000..9e20e1ed6 --- /dev/null +++ b/tests/hardware/kvm/avocent/acs/8000/memory.robot @@ -0,0 +1,38 @@ +*** Settings *** +Documentation memory mode + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + + +*** Variables *** +${SNMPCOMMUNITY} hardware/kvm/avocent/acs/8000/avocent8000 + + +*** Test Cases *** +Memory + [Tags] hardware kvm avocent memory snmp + ${output} Run Avocent 8000 Plugin "memory" "" + + ${output} Strip String ${output} + Should Be Equal As Strings + ... ${output} + ... OK: Ram Total: 1.92 GB Used (-buffers/cache): 626.18 MB (31.79%) Free: 1.31 GB (68.21%), Buffer: 2.04 MB, Cached: 723.54 MB, Shared: 26.09 MB | 'used'=656592896B;;;0;2065698816 'free'=1409105920B;;;0;2065698816 'used_prct'=31.79%;;;0;100 'buffer'=2134016B;;;0; 'cached'=758689792B;;;0; 'shared'=27357184B;;;0; + ... Wrong output result for command:{\n}${output}{\n}{\n}{\n} + +*** Keywords *** +Run Avocent 8000 Plugin + [Arguments] ${mode} ${extraoptions} + ${command} Catenate + ... ${CENTREON_PLUGINS} + ... --plugin=hardware::kvm::avocent::acs::8000::snmp::plugin + ... --mode=${mode} + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} + ... --snmp-community=${SNMPCOMMUNITY} + ... ${extraoptions} + + ${output} Run ${command} + RETURN ${output} diff --git a/tests/hardware/kvm/avocent/acs/8000/hardware-kvm-avocent-acs-8000.robot b/tests/hardware/kvm/avocent/acs/8000/serial_ports.robot similarity index 52% rename from tests/hardware/kvm/avocent/acs/8000/hardware-kvm-avocent-acs-8000.robot rename to tests/hardware/kvm/avocent/acs/8000/serial_ports.robot index 1eb1c73c1..8e15dce84 100644 --- a/tests/hardware/kvm/avocent/acs/8000/hardware-kvm-avocent-acs-8000.robot +++ b/tests/hardware/kvm/avocent/acs/8000/serial_ports.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation hardware::kvm::avocent::acs::8000::snmp::plugin +Documentation serial-ports mode Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource @@ -11,60 +11,7 @@ ${SNMPCOMMUNITY} hardware/kvm/avocent/acs/8000/avocent8000 *** Test Cases *** -Cpu-Detailed - [Documentation] cpu-detailed mode - [Tags] hardware kvm avocent cpu snmp - Remove File /dev/shm/snmpstandard_127.0.0.1_2024_cpu-detailed* - ${output} Run Avocent 8000 Plugin "cpu-detailed" --statefile-dir=/dev/shm/ - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... OK: CPU Usage: user : Buffer creation, nice : Buffer creation, system : Buffer creation, idle : Buffer creation, wait : Buffer creation, kernel : Buffer creation, interrupt : Buffer creation, softirq : Buffer creation, steal : Buffer creation, guest : Buffer creation, guestnice : Buffer creation - ... Wrong output result for command:{\n}${output}{\n}{\n}{\n} - - ${output} Run Avocent 8000 Plugin "cpu-detailed" --statefile-dir=/dev/shm/ - ${output} Strip String ${output} - Remove File /dev/shm/snmpstandard_127.0.0.1_2024_cpu-detailed* - Should Be Equal As Strings - ... ${output} - ... OK: CPU Usage: user : counter not moved, nice : counter not moved, system : counter not moved, idle : counter not moved, wait : counter not moved, kernel : counter not moved, interrupt : counter not moved, softirq : counter not moved, steal : counter not moved, guest : counter not moved, guestnice : counter not moved - ... Wrong output result for command:{\n}${output}{\n}{\n}{\n} - -Hardware - [Documentation] hardware mode - [Tags] hardware kvm avocent hardware-mode snmp - ${output} Run Avocent 8000 Plugin "hardware" "" - - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... OK: All 2 components are ok [2/2 psus]. | 'hardware.psu.count'=2;;;; - ... Wrong output result for command:{\n}${output}{\n}{\n}{\n} - -Load - [Documentation] load mode - [Tags] hardware kvm avocent load snmp - ${output} Run Avocent 8000 Plugin "load" "" - - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... OK: Load average: 0.04, 0.10, 0.15 | 'load1'=0.04;;;0; 'load5'=0.10;;;0; 'load15'=0.15;;;0; - ... Wrong output result for command:{\n}${output}{\n}{\n}{\n} - -Memory - [Documentation] memory mode - [Tags] hardware kvm avocent memory snmp - ${output} Run Avocent 8000 Plugin "memory" "" - - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... OK: Ram Total: 1.92 GB Used (-buffers/cache): 626.18 MB (31.79%) Free: 1.31 GB (68.21%), Buffer: 2.04 MB, Cached: 723.54 MB, Shared: 26.09 MB | 'used'=656592896B;;;0;2065698816 'free'=1409105920B;;;0;2065698816 'used_prct'=31.79%;;;0;100 'buffer'=2134016B;;;0; 'cached'=758689792B;;;0; 'shared'=27357184B;;;0; - ... Wrong output result for command:{\n}${output}{\n}{\n}{\n} - Serial Ports - [Documentation] serial-ports mode [Tags] hardware kvm avocent serial snmp Remove File /dev/shm/avocent_acs_8000_127.0.0.1_2024_serial-ports* ${output} Run Avocent 8000 Plugin "serial-ports" --statefile-dir=/dev/shm/ diff --git a/tests/os/linux/local/List-Systemdservices-v219.robot b/tests/os/linux/local/List-Systemdservices-v219.robot new file mode 100644 index 000000000..db2e09eff --- /dev/null +++ b/tests/os/linux/local/List-Systemdservices-v219.robot @@ -0,0 +1,31 @@ +*** Settings *** +Documentation Linux Local list-systemdservices + +Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + + +*** Variables *** +${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::local::plugin +${COND} ${PERCENT}\{sub\} =~ /exited/ && ${PERCENT}{display} =~ /network/' + + +*** Test Cases *** +List-Systemdservices v219 ${tc} + [Documentation] Systemd version < 248 + [Tags] os linux local + ${command} Catenate + ... ${CMD} + ... --mode=list-systemdservices + ... --command-path=${CURDIR}${/}systemd-219 + ... --filter-name='${filtername}' + ... --filter-description='${filterdescription}' + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc filtername filterdescription expected_result -- + ... 1 toto ${EMPTY} List systemd services: + ... 2 NetworkManager.service ${EMPTY} List systemd services: \n\'NetworkManager.service\' [desc = Network Manager] [load = loaded] [active = active] [sub = running] + ... 3 ${EMPTY} toto List systemd services: + ... 4 ${EMPTY} Permit User Sessions List systemd services: \n\'systemd-user-sessions.service\' [desc = Permit User Sessions] [load = loaded] [active = active] [sub = exited] \ No newline at end of file diff --git a/tests/os/linux/local/List-Systemdservices-v252.robot b/tests/os/linux/local/List-Systemdservices-v252.robot new file mode 100644 index 000000000..a0ec2e145 --- /dev/null +++ b/tests/os/linux/local/List-Systemdservices-v252.robot @@ -0,0 +1,31 @@ +*** Settings *** +Documentation Linux Local list-systemdservices + +Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + + +*** Variables *** +${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::local::plugin +${COND} ${PERCENT}\{sub\} =~ /exited/ && ${PERCENT}{display} =~ /network/' + + +*** Test Cases *** +List-Systemdservices v252 ${tc} + [Documentation] Systemd version >= 248 + [Tags] os linux local + ${command} Catenate + ... ${CMD} + ... --mode=list-systemdservices + ... --command-path=${CURDIR}${/}systemd-252 + ... --filter-name='${filtername}' + ... --filter-description='${filterdescription}' + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc filtername filterdescription expected_result -- + ... 1 toto ${EMPTY} List systemd services: + ... 2 NetworkManager.service ${EMPTY} List systemd services: \n\'NetworkManager.service\' [desc = Network Manager] [load = loaded] [active = active] [sub = running] + ... 3 ${EMPTY} toto List systemd services: + ... 4 ${EMPTY} Permit User Sessions List systemd services: \n\'systemd-user-sessions.service\' [desc = Permit User Sessions] [load = loaded] [active = active] [sub = exited] diff --git a/tests/os/linux/local/os-linux-list-systemdservices.robot b/tests/os/linux/local/os-linux-list-systemdservices.robot deleted file mode 100644 index 0a22b5d3c..000000000 --- a/tests/os/linux/local/os-linux-list-systemdservices.robot +++ /dev/null @@ -1,59 +0,0 @@ -*** Settings *** -Documentation Linux Local list-systemdservices - -Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource - -Test Timeout 120s - - -*** Variables *** -${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::local::plugin -${COND} ${PERCENT}\{sub\} =~ /exited/ && ${PERCENT}{display} =~ /network/' - - -*** Test Cases *** -List-Systemdservices v219 ${tc}/4 - [Documentation] Systemd version < 248 - [Tags] os linux local - ${command} Catenate - ... ${CMD} - ... --mode=list-systemdservices - ... --command-path=${CURDIR}${/}systemd-219 - ... --filter-name='${filtername}' - ... --filter-description='${filterdescription}' - - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n - - Examples: tc filtername filterdescription expected_result -- - ... 1 toto ${EMPTY} List systemd services: - ... 2 NetworkManager.service ${EMPTY} List systemd services: \n\'NetworkManager.service\' [desc = Network Manager] [load = loaded] [active = active] [sub = running] - ... 3 ${EMPTY} toto List systemd services: - ... 4 ${EMPTY} Permit User Sessions List systemd services: \n\'systemd-user-sessions.service\' [desc = Permit User Sessions] [load = loaded] [active = active] [sub = exited] - -List-Systemdservices v252 ${tc}/4 - [Documentation] Systemd version >= 248 - [Tags] os linux local - ${command} Catenate - ... ${CMD} - ... --mode=list-systemdservices - ... --command-path=${CURDIR}${/}systemd-252 - ... --filter-name='${filtername}' - ... --filter-description='${filterdescription}' - - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n - - Examples: tc filtername filterdescription expected_result -- - ... 1 toto ${EMPTY} List systemd services: - ... 2 NetworkManager.service ${EMPTY} List systemd services: \n\'NetworkManager.service\' [desc = Network Manager] [load = loaded] [active = active] [sub = running] - ... 3 ${EMPTY} toto List systemd services: - ... 4 ${EMPTY} Permit User Sessions List systemd services: \n\'systemd-user-sessions.service\' [desc = Permit User Sessions] [load = loaded] [active = active] [sub = exited] diff --git a/tests/os/linux/local/os-linux-system-sc-status.robot b/tests/os/linux/local/os-linux-system-sc-status.robot deleted file mode 100644 index 982f3f510..000000000 --- a/tests/os/linux/local/os-linux-system-sc-status.robot +++ /dev/null @@ -1,97 +0,0 @@ -*** Settings *** -Documentation Linux Local Systemd-sc-status - -# systemd changed the output format of the command starting from version 252, so we need to check for a systemd version and use the correct parameter. -Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource - -Test Timeout 120s - - -*** Variables *** -${CMD} ${CENTREON_PLUGINS} --plugin=os::linux::local::plugin - - -*** Test Cases *** -Systemd-sc-status v219 ${tc}/15 - [Documentation] Systemd version < 248 - [Tags] os linux local - ${command} Catenate - ... ${CMD} - ... --mode=systemd-sc-status - ... --command-path=${CURDIR}${/}systemd-219 - ... --filter-name='${filter}' - ... --exclude-name='${exclude}' - ... --warning-status='${w_stat}' - ... --critical-status='${c_stat}' - ... --warning-total-running='${w_running}' - ... --critical-total-running='${c_running}' - ... --warning-total-dead='${w_dead}' - ... --critical-total-dead='${c_dead}' - ... --warning-total-exited='${w_exited}' - ... --critical-total-exited='${c_exited}' - ... --warning-total-failed='${w_failed}' - ... --critical-total-failed='${c_failed}' - - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... \nWrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n - - Examples: tc filter exclude w_stat c_stat w_running c_running w_dead c_dead w_exited c_exited w_failed c_failed expected_result -- - ... 1 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: Total Running: 34, Total Failed: 1, Total Dead: 97, Total Exited: 25 - All services are ok | 'total_running'=34;;;0;220 'total_failed'=1;;;0;220 'total_dead'=97;;;0;220 'total_exited'=25;;;0;220 - ... 2 toto ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} UNKNOWN: No service found. - ... 3 NetworkManager ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: Total Running: 1, Total Failed: 0, Total Dead: 0, Total Exited: 1 - All services are ok | 'total_running'=1;;;0;2 'total_failed'=0;;;0;2 'total_dead'=0;;;0;2 'total_exited'=1;;;0;2 - ... 4 ${EMPTY} Manager ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: Total Running: 33, Total Failed: 1, Total Dead: 97, Total Exited: 24 - All services are ok | 'total_running'=33;;;0;218 'total_failed'=1;;;0;218 'total_dead'=97;;;0;218 'total_exited'=24;;;0;218 - ... 5 NetworkManager ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: Total Running: 1, Total Failed: 0, Total Dead: 0, Total Exited: 1 - All services are ok | 'total_running'=1;;;0;2 'total_failed'=0;;;0;2 'total_dead'=0;;;0;2 'total_exited'=1;;;0;2 - ... 8 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} WARNING: Total Running: 34 | 'total_running'=34;0:0;;0;220 'total_failed'=1;;;0;220 'total_dead'=97;;;0;220 'total_exited'=25;;;0;220 - ... 9 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} CRITICAL: Total Running: 34 | 'total_running'=34;;0:0;0;220 'total_failed'=1;;;0;220 'total_dead'=97;;;0;220 'total_exited'=25;;;0;220 - ... 10 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} WARNING: Total Dead: 97 | 'total_running'=34;;;0;220 'total_failed'=1;;;0;220 'total_dead'=97;0:0;;0;220 'total_exited'=25;;;0;220 - ... 11 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} CRITICAL: Total Dead: 97 | 'total_running'=34;;;0;220 'total_failed'=1;;;0;220 'total_dead'=97;;0:0;0;220 'total_exited'=25;;;0;220 - ... 12 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0 ${EMPTY} ${EMPTY} ${EMPTY} WARNING: Total Exited: 25 | 'total_running'=34;;;0;220 'total_failed'=1;;;0;220 'total_dead'=97;;;0;220 'total_exited'=25;0:0;;0;220 - ... 13 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0 ${EMPTY} ${EMPTY} CRITICAL: Total Exited: 25 | 'total_running'=34;;;0;220 'total_failed'=1;;;0;220 'total_dead'=97;;;0;220 'total_exited'=25;;0:0;0;220 - ... 14 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0 ${EMPTY} WARNING: Total Failed: 1 | 'total_running'=34;;;0;220 'total_failed'=1;0:0;;0;220 'total_dead'=97;;;0;220 'total_exited'=25;;;0;220 - ... 15 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0 CRITICAL: Total Failed: 1 | 'total_running'=34;;;0;220 'total_failed'=1;;0:0;0;220 'total_dead'=97;;;0;220 'total_exited'=25;;;0;220 - -Systemd-sc-status v252 ${tc}/15 - [Documentation] Systemd version >= 248 - [Tags] os linux local - ${command} Catenate - ... ${CMD} - ... --mode=systemd-sc-status - ... --command-path=${CURDIR}${/}systemd-252 - ... --filter-name='${filter}' - ... --exclude-name='${exclude}' - ... --warning-status='${w_stat}' - ... --critical-status='${c_stat}' - ... --warning-total-running='${w_running}' - ... --critical-total-running='${c_running}' - ... --warning-total-dead='${w_dead}' - ... --critical-total-dead='${c_dead}' - ... --warning-total-exited='${w_exited}' - ... --critical-total-exited='${c_exited}' - ... --warning-total-failed='${w_failed}' - ... --critical-total-failed='${c_failed}' - - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... Wrong output result for command:\n${command}\n\nExpected:\n${expected_result}\nCommand output:\n${output}\n\n - - Examples: tc filter exclude w_stat c_stat w_running c_running w_dead c_dead w_exited c_exited w_failed c_failed expected_result -- - ... 1 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: Total Running: 31, Total Failed: 4, Total Dead: 108, Total Exited: 19 - All services are ok | 'total_running'=31;;;0;258 'total_failed'=4;;;0;258 'total_dead'=108;;;0;258 'total_exited'=19;;;0;258 - ... 2 toto ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} UNKNOWN: No service found. - ... 3 NetworkManager ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: Total Running: 1, Total Failed: 0, Total Dead: 0, Total Exited: 1 - All services are ok | 'total_running'=1;;;0;2 'total_failed'=0;;;0;2 'total_dead'=0;;;0;2 'total_exited'=1;;;0;2 - ... 4 ${EMPTY} Manager ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: Total Running: 30, Total Failed: 4, Total Dead: 108, Total Exited: 18 - All services are ok | 'total_running'=30;;;0;256 'total_failed'=4;;;0;256 'total_dead'=108;;;0;256 'total_exited'=18;;;0;256 - ... 5 NetworkManager ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: Total Running: 1, Total Failed: 0, Total Dead: 0, Total Exited: 1 - All services are ok | 'total_running'=1;;;0;2 'total_failed'=0;;;0;2 'total_dead'=0;;;0;2 'total_exited'=1;;;0;2 - ... 8 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 2 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} WARNING: Total Running: 31 | 'total_running'=31;0:2;;0;258 'total_failed'=4;;;0;258 'total_dead'=108;;;0;258 'total_exited'=19;;;0;258 - ... 9 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 2 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} CRITICAL: Total Running: 31 | 'total_running'=31;;0:2;0;258 'total_failed'=4;;;0;258 'total_dead'=108;;;0;258 'total_exited'=19;;;0;258 - ... 10 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 2 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} WARNING: Total Dead: 108 | 'total_running'=31;;;0;258 'total_failed'=4;;;0;258 'total_dead'=108;0:2;;0;258 'total_exited'=19;;;0;258 - ... 11 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 2 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} CRITICAL: Total Dead: 108 | 'total_running'=31;;;0;258 'total_failed'=4;;;0;258 'total_dead'=108;;0:2;0;258 'total_exited'=19;;;0;258 - ... 12 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 2 ${EMPTY} ${EMPTY} ${EMPTY} WARNING: Total Exited: 19 | 'total_running'=31;;;0;258 'total_failed'=4;;;0;258 'total_dead'=108;;;0;258 'total_exited'=19;0:2;;0;258 - ... 13 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 2 ${EMPTY} ${EMPTY} CRITICAL: Total Exited: 19 | 'total_running'=31;;;0;258 'total_failed'=4;;;0;258 'total_dead'=108;;;0;258 'total_exited'=19;;0:2;0;258 - ... 14 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 2 ${EMPTY} WARNING: Total Failed: 4 | 'total_running'=31;;;0;258 'total_failed'=4;0:2;;0;258 'total_dead'=108;;;0;258 'total_exited'=19;;;0;258 - ... 15 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 2 CRITICAL: Total Failed: 4 | 'total_running'=31;;;0;258 'total_failed'=4;;0:2;0;258 'total_dead'=108;;;0;258 'total_exited'=19;;;0;258 diff --git a/tests/resources/spellcheck/stopwords.txt b/tests/resources/spellcheck/stopwords.txt index cfc38f629..9e9b181f7 100644 --- a/tests/resources/spellcheck/stopwords.txt +++ b/tests/resources/spellcheck/stopwords.txt @@ -1,17 +1,8 @@ 2c ---warning-authservers-total ---critical-authservers-total ---warning-authserver-roundtrip-time ---critical-authserver-roundtrip-time ---warning-authserver-packets-access-requests ---critical-authserver-packets-access-requests ---warning-authserver-packets-access-accepts ---critical-authserver-packets-access-accepts ---warning-authserver-clients-timeout ---critical-authserver-clients-timeout 3COM 3CX --3cx-version +ACS --add-fc-fe-errors --add-qos-limit --add-sysdesc @@ -28,6 +19,7 @@ api.meraki.com --api-version ASAM Avigilon +Avocent aws AWSCLI --aws-role-arn @@ -43,6 +35,11 @@ connections-dns cpu-utilization-1m cpu-utilization-5m cpu-utilization-5s +--critical-authserver-clients-timeout +--critical-authserver-packets-access-accepts +--critical-authserver-packets-access-requests +--critical-authserver-roundtrip-time +--critical-authservers-total --critical-backend-congestions --critical-backend-outstanding-io --critical-bytesallocatedpercentage @@ -96,7 +93,6 @@ ipv4 ipv6 ISAM Iwsva ---jobq JOBQ jobqueue jobqueues @@ -125,7 +121,6 @@ module-cellradio-rsrq module-cellradio-snr modules-cellradio-detected Mosquitto ---mqtt MQTT --mqtt-allow-insecure --mqtt-ca-certificate @@ -137,7 +132,6 @@ MQTT --mqtt-timeout --mqtt-username multiple -nagios Nagios NagVis --nagvis-perfdata @@ -148,10 +142,8 @@ NLCapacity --noidle -NoLogo --nomachineaccount ---ntlmv2 NTLMv2 NTP ---oid OID --oid-display --oid-extra-display @@ -218,6 +210,11 @@ VM VMware VPN vSAN +--warning-authserver-clients-timeout +--warning-authserver-packets-access-accepts +--warning-authserver-packets-access-requests +--warning-authserver-roundtrip-time +--warning-authservers-total --warning-backend-congestions --warning-backend-outstanding-io --warning-bytesallocatedpercentage diff --git a/tests/storage/datacore/restapi/alert-count.robot b/tests/storage/datacore/restapi/alert-count.robot new file mode 100644 index 000000000..3752916ff --- /dev/null +++ b/tests/storage/datacore/restapi/alert-count.robot @@ -0,0 +1,33 @@ +*** Settings *** +Documentation datacore rest api plugin + +Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}storage-datacore-api.json + +${CMD} ${CENTREON_PLUGINS} --plugin=storage::datacore::restapi::plugin --password=pass --username=user --port=${APIPORT} --hostname=${HOSTNAME} --proto=http + + +*** Test Cases *** +Datacore check alert count ${tc} + [Documentation] Check Datacore pool usage + [Tags] storage api + ${command} Catenate + ... ${CMD} + ... --mode=alerts + ... --warning-error=${warning-error} + ... --critical-error=${critical-error} + ... --warning-warning=${warning-warning} + ... --critical-warning=${critical-warning} + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc warning-error critical-error warning-warning critical-warning expected_result -- + ... 1 0 1 5 5 WARNING: number of error alerts : 1 | 'datacore.event.error.count'=1;0:0;0:1;0; 'datacore.alerts.warning.count'=1;0:5;0:5;0; 'datacore.alerts.info.count'=0;;;0; 'datacore.alerts.trace.count'=0;;;0; + ... 2 5 5 5 5 OK: number of error alerts : 1, number of warning alerts : 1, number of info alerts : 0, number of trace alerts : 0 | 'datacore.event.error.count'=1;0:5;0:5;0; 'datacore.alerts.warning.count'=1;0:5;0:5;0; 'datacore.alerts.info.count'=0;;;0; 'datacore.alerts.trace.count'=0;;;0; \ No newline at end of file diff --git a/tests/storage/datacore/restapi/storage-datacore-restapi.robot b/tests/storage/datacore/restapi/pool-usage.robot similarity index 53% rename from tests/storage/datacore/restapi/storage-datacore-restapi.robot rename to tests/storage/datacore/restapi/pool-usage.robot index 025b50824..08c3a7145 100644 --- a/tests/storage/datacore/restapi/storage-datacore-restapi.robot +++ b/tests/storage/datacore/restapi/pool-usage.robot @@ -31,34 +31,4 @@ Datacore check pool usage ${tc} Examples: tc warning-bytesallocatedpercentage critical-bytesallocatedpercentage warning-oversubscribed critical-oversubscribed expected_result -- ... 1 2 5 -1 3 CRITICAL: Bytes Allocated : 12 % WARNING: Over subscribed bytes : 0 | 'datacore.pool.bytesallocated.percentage'=12%;0:2;0:5;0;100 'datacore.pool.oversubscribed.bytes'=0bytes;0:-1;0:3;0; - ... 2 70 80 10 20 OK: Bytes Allocated : 12 % - Over subscribed bytes : 0 | 'datacore.pool.bytesallocated.percentage'=12%;0:70;0:80;0;100 'datacore.pool.oversubscribed.bytes'=0bytes;0:10;0:20;0; - -Datacore check alert count ${tc} - [Documentation] Check Datacore pool usage - [Tags] storage api - ${command} Catenate - ... ${CMD} - ... --mode=alerts - ... --warning-error=${warning-error} - ... --critical-error=${critical-error} - ... --warning-warning=${warning-warning} - ... --critical-warning=${critical-warning} - - Ctn Run Command And Check Result As Strings ${command} ${expected_result} - - Examples: tc warning-error critical-error warning-warning critical-warning expected_result -- - ... 1 0 1 5 5 WARNING: number of error alerts : 1 | 'datacore.event.error.count'=1;0:0;0:1;0; 'datacore.alerts.warning.count'=1;0:5;0:5;0; 'datacore.alerts.info.count'=0;;;0; 'datacore.alerts.trace.count'=0;;;0; - ... 2 5 5 5 5 OK: number of error alerts : 1, number of warning alerts : 1, number of info alerts : 0, number of trace alerts : 0 | 'datacore.event.error.count'=1;0:5;0:5;0; 'datacore.alerts.warning.count'=1;0:5;0:5;0; 'datacore.alerts.info.count'=0;;;0; 'datacore.alerts.trace.count'=0;;;0; - -Datacore check status monitor ${tc} - [Documentation] Check Datacore pool usage - [Tags] storage api - ${command} Catenate - ... ${CMD} - ... --mode=status-monitor - ... --statefile-dir=/dev/shm/ - - Ctn Run Command And Check Result As Strings ${command} ${expected_result} - - Examples: tc expected_result -- - ... 1 CRITICAL: 'State of HostVM2' status : 'Critical', message is 'Connected' + ... 2 70 80 10 20 OK: Bytes Allocated : 12 % - Over subscribed bytes : 0 | 'datacore.pool.bytesallocated.percentage'=12%;0:70;0:80;0;100 'datacore.pool.oversubscribed.bytes'=0bytes;0:10;0:20;0; \ No newline at end of file diff --git a/tests/storage/datacore/restapi/status-monitor.robot b/tests/storage/datacore/restapi/status-monitor.robot new file mode 100644 index 000000000..b1372fed4 --- /dev/null +++ b/tests/storage/datacore/restapi/status-monitor.robot @@ -0,0 +1,29 @@ +*** Settings *** +Documentation datacore rest api plugin + +Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource + +Suite Setup Start Mockoon ${MOCKOON_JSON} +Suite Teardown Stop Mockoon +Test Timeout 120s + + +*** Variables *** +${MOCKOON_JSON} ${CURDIR}${/}storage-datacore-api.json + +${CMD} ${CENTREON_PLUGINS} --plugin=storage::datacore::restapi::plugin --password=pass --username=user --port=${APIPORT} --hostname=${HOSTNAME} --proto=http + + +*** Test Cases *** +Datacore check status monitor ${tc} + [Documentation] Check Datacore pool usage + [Tags] storage api + ${command} Catenate + ... ${CMD} + ... --mode=status-monitor + ... --statefile-dir=/dev/shm/ + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc expected_result -- + ... 1 CRITICAL: 'State of HostVM2' status : 'Critical', message is 'Connected' diff --git a/tests/storage/synology/snmp/Components.robot b/tests/storage/synology/snmp/Components.robot new file mode 100644 index 000000000..9e1c40c87 --- /dev/null +++ b/tests/storage/synology/snmp/Components.robot @@ -0,0 +1,29 @@ +*** Settings *** +Documentation Storage Synology SNMP + +Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + + +*** Variables *** +${CMD} ${CENTREON_PLUGINS} --plugin=storage::synology::snmp::plugin + +*** Test Cases *** +Components ${tc} + [Tags] storage synology snmp + ${command} Catenate + ... ${CMD} + ... --mode=components + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} + ... --snmp-community=${snmpcommunity} + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc snmpcommunity expected_result -- + ... 1 storage/synology/snmp/synology-disk-ok OK: All 8 components are ok [2/2 disk, 2/2 fan, 1/1 psu, 2/2 raid, 1/1 system]. | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; + ... 2 storage/synology/snmp/synology-disk-warning WARNING: Disk 'Disk 2' health is warning | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; + ... 3 storage/synology/snmp/synology-disk-critical CRITICAL: Disk 'Disk 2' health is critical | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; + ... 4 storage/synology/snmp/synology-disk-failing CRITICAL: Disk 'Disk 2' health is failing | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; \ No newline at end of file diff --git a/tests/storage/synology/snmp/Uptime.robot b/tests/storage/synology/snmp/Uptime.robot new file mode 100644 index 000000000..f86a7b9bf --- /dev/null +++ b/tests/storage/synology/snmp/Uptime.robot @@ -0,0 +1,30 @@ +*** Settings *** +Documentation Storage Synology SNMP + +Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + + +*** Variables *** +${CMD} ${CENTREON_PLUGINS} --plugin=storage::synology::snmp::plugin + +*** Test Cases *** +Uptime ${tc} + [Tags] storage synology snmp + ${command} Catenate + ... ${CMD} + ... --mode=uptime + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} + ... --snmp-community=storage/synology/snmp/synology-disk-ok + ... --warning-uptime=${warning} + ... --critical-uptime=${critical} + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc warning critical expected_result -- + ... 1 ${Empty} ${Empty} OK: System uptime is: 46m 5s | 'uptime'=2765.00s;;;0; + ... 2 10 ${Empty} WARNING: System uptime is: 46m 5s | 'uptime'=2765.00s;0:10;;0; + ... 3 ${Empty} 10 CRITICAL: System uptime is: 46m 5s | 'uptime'=2765.00s;;0:10;0; \ No newline at end of file diff --git a/tests/storage/synology/snmp/storage-synology-snmp.robot b/tests/storage/synology/snmp/storage-synology-snmp.robot deleted file mode 100644 index 40fa65f90..000000000 --- a/tests/storage/synology/snmp/storage-synology-snmp.robot +++ /dev/null @@ -1,88 +0,0 @@ -*** Settings *** -Documentation Storage Synology SNMP - -Resource ${CURDIR}${/}..${/}..${/}..${/}resources/import.resource - -Test Timeout 120s - - -*** Variables *** -${CMD} ${CENTREON_PLUGINS} --plugin=storage::synology::snmp::plugin - -&{check_components_test1} -... description=Checking disk components when all disks are ok -... snmpcommunity=storage/synology/snmp/synology-disk-ok -... expected_output=OK: All 8 components are ok [2/2 disk, 2/2 fan, 1/1 psu, 2/2 raid, 1/1 system]. | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; -&{check_components_test2} -... description=Checking disk components when one disks is warning -... snmpcommunity=storage/synology/snmp/synology-disk-warning -... expected_output=WARNING: Disk 'Disk 2' health is warning | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; -&{check_components_test3} -... description=Checking disk components when one disks is critical -... snmpcommunity=storage/synology/snmp/synology-disk-critical -... expected_output=CRITICAL: Disk 'Disk 2' health is critical | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; -&{check_components_test4} -... description=Checking disk components when one disks is failing -... snmpcommunity=storage/synology/snmp/synology-disk-failing -... expected_output=CRITICAL: Disk 'Disk 2' health is failing | 'Disk 1#hardware.disk.bad_sectors.count'=0;;;0; 'Disk 2#hardware.disk.bad_sectors.count'=0;;;0; 'hardware.disk.count'=2;;;; 'hardware.fan.count'=2;;;; 'hardware.psu.count'=1;;;; 'hardware.raid.count'=2;;;; 'hardware.system.count'=1;;;; -@{check_components_tests} -... &{check_components_test1} -... &{check_components_test2} -... &{check_components_test3} -... &{check_components_test4} - -&{uptime_t1} -... description=Uptime check expected to be OK -... snmpcommunity=storage/synology/snmp/synology-disk-ok -... warning= -... critical= -... expected_output=OK: System uptime is: 46m 5s | 'uptime'=2765.00s;;;0; -&{uptime_t2} -... description=Uptime check expected to be warning -... snmpcommunity=storage/synology/snmp/synology-disk-ok -... warning=10 -... critical= -... expected_output=WARNING: System uptime is: 46m 5s | 'uptime'=2765.00s;0:10;;0; -&{uptime_t3} -... description=Uptime check expected to be critical -... snmpcommunity=storage/synology/snmp/synology-disk-ok -... warning= -... critical=10 -... expected_output=CRITICAL: System uptime is: 46m 5s | 'uptime'=2765.00s;;0:10;0; - -@{uptime_tests} -... &{uptime_t1} -... &{uptime_t2} -... &{uptime_t3} - - -*** Test Cases *** -Components - [Tags] storage synology snmp - FOR ${check_components_test} IN @{check_components_tests} - ${command} Catenate - ... ${CMD} - ... --mode=components - ... --hostname=${HOSTNAME} - ... --snmp-version=${SNMPVERSION} - ... --snmp-port=${SNMPPORT} - ... --snmp-community=${check_components_test.snmpcommunity} - - Ctn Run Command And Check Result As Strings ${command} ${check_components_test.expected_output} - END - -Uptime - [Tags] storage synology snmp - FOR ${test_item} IN @{uptime_tests} - ${command} Catenate - ... ${CMD} - ... --mode=uptime - ... --hostname=${HOSTNAME} - ... --snmp-version=${SNMPVERSION} - ... --snmp-port=${SNMPPORT} - ... --snmp-community=${test_item.snmpcommunity} - ... --warning-uptime=${test_item.warning} - ... --critical-uptime=${test_item.critical} - - Ctn Run Command And Check Result As Strings ${command} ${test_item.expected_output} - END