From 68eda07cc442bb8d10441b83e55513c1394118f2 Mon Sep 17 00:00:00 2001 From: Kristofer Hallin Date: Sun, 29 May 2022 14:55:57 +0200 Subject: [PATCH] Verify all table elements for system MIB tests. --- test/test_snmp_system.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/test/test_snmp_system.sh b/test/test_snmp_system.sh index 37759dc9..fb8e1b35 100755 --- a/test/test_snmp_system.sh +++ b/test/test_snmp_system.sh @@ -64,21 +64,21 @@ cat < $fstate clixon@clicon.com Clixon HQ System description - + 11223344 72 1 - + IP-MIB::ip Entry 1 description - + 11223344 2 - + IF-MIB:ifTable Entry 2 description - + 1122111111 @@ -125,6 +125,7 @@ testinit OID_SYS=".1.3.6.1.2.1.1" OID_DESCR=".1.3.6.1.2.1.1.1" +OID_UPTIME=".1.3.6.1.2.1.1.3" OID_CONTACT=".1.3.6.1.2.1.1.4" OID_LOCATION=".1.3.6.1.2.1.1.6" OID_SYSNAME=".1.3.6.1.2.1.1.5" @@ -140,7 +141,7 @@ new "Get description, $OID_DESCR" expectpart "$($snmpget $OID_DESCR)" 0 "$OID_DESCR = STRING: System description" new "Get next $OID_DESCR" -expectpart "$($snmpgetnext $OID_DESCR)" 0 "$OID_CONTACT = STRING: clixon@clicon.com" +expectpart "$($snmpgetnext $OID_DESCR)" 0 "$OID_UPTIME = Timeticks: (11223344) 1 day, 7:10:33.44" new "Get contact, $OID_CONTACT" expectpart "$($snmpget $OID_CONTACT)" 0 "$OID_CONTACT = STRING: clixon@clicon.com" @@ -182,8 +183,8 @@ new "Get sysORTable, entry 2 $OID_ORTABLE2" expectpart "$($snmpget $OID_ORTABLE2)" 0 "STRING: Entry 2 description" new "Get table sysORTable $OID_ORTABLE" -expectpart "$($snmptable $OID_ORTABLE)" 0 ".*Entry 1 description.*" -expectpart "$($snmptable $OID_ORTABLE)" 0 ".*Entry 2 description.*" +expectpart "$($snmptable $OID_ORTABLE)" 0 ".*Entry 1 description.*" "IP-MIB::ip" "1:7:10:33.44" +expectpart "$($snmptable $OID_ORTABLE)" 0 ".*Entry 2 description.*" "IF-MIB::ifTable" "129:20:58:31.11" new "Cleaning up" testexit