From c429762ee906be39cabdec0490740e16e6497361 Mon Sep 17 00:00:00 2001 From: sfarouq-ext <116093375+sfarouq-ext@users.noreply.github.com> Date: Mon, 5 Aug 2024 19:00:32 +0200 Subject: [PATCH] adding a keyword --- tests/robot/network/teldat/snmp/cpu.robot | 10 ++-------- tests/robot/network/teldat/snmp/memory.robot | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/tests/robot/network/teldat/snmp/cpu.robot b/tests/robot/network/teldat/snmp/cpu.robot index eb2681764..a1ca0a2ff 100644 --- a/tests/robot/network/teldat/snmp/cpu.robot +++ b/tests/robot/network/teldat/snmp/cpu.robot @@ -27,14 +27,8 @@ CPU ${tc} ... --warning-cpu-utilization-5m=${warningcpuutilization5m} ... --critical-cpu-utilization-5m=${criticalcpuutilization5m} - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${result} - ... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${result}\n - ... values=False - ... collapse_spaces=True + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + Examples: tc warningcpuutilization5s criticalcpuutilization5s warningcpuutilization1m criticalcpuutilization1m warningcpuutilization5m criticalcpuutilization5m result -- ... 1 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: cpu average usage: 1.00 % (5s), 1.00 % (1m), 1.00 % (5m) | 'cpu.utilization.5s.percentage'=1.00%;;;0;100 'cpu.utilization.1m.percentage'=1.00%;;;0;100 'cpu.utilization.15m.percentage'=1.00%;;;0;100 diff --git a/tests/robot/network/teldat/snmp/memory.robot b/tests/robot/network/teldat/snmp/memory.robot index b9d03ad7c..e97040be1 100644 --- a/tests/robot/network/teldat/snmp/memory.robot +++ b/tests/robot/network/teldat/snmp/memory.robot @@ -27,14 +27,8 @@ Memory ${tc} ... --warning-usage-prct=${warningusageprct} ... --critical-usage-prct=${criticalusageprct} - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${expected_result} - ... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n - ... values=False - ... collapse_spaces=True + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + Examples: tc warningusage criticalusage warningusagefree criticalusagefree warningusageprct criticalusageprct expected_result -- ... 1 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: Memory 'system' total: 256.00 MB used: 100.54 MB (39.27%) free: 155.46 MB (60.73%) | 'system#memory.usage.bytes'=105419600B;;;0;268435456 'system#memory.free.bytes'=163015856B;;;0;268435456 'system#memory.usage.percentage'=39.27%;;;0;100