Only run certain tests if snmp_debug is set.

This commit is contained in:
Kristofer Hallin 2022-06-02 19:34:07 +02:00
parent c42379e874
commit 8e1705495c

View file

@ -203,18 +203,18 @@ validate_oid $OID12 $OID12 "INTEGER" 1
new "Get bulk OIDs"
expectpart "$($snmpbulkget $OID1)" 0 "$OID2 = INTEGER: -1" "$OID3 = STRING: \"This is not default\"" "$OID4 = Timeticks: (12345) 0:02:03.45" "$OID5 = INTEGER: 48" "$OID6 = Gauge32: 123123123" "$OID7 = INTEGER: 3" "$OID8 = Counter32: 123456" "$OID9 = Counter64: 4294967296" "$OID10 = INTEGER: 1" "$OID11 = Timeticks: (1234567890) 142 days, 21:21:18.90"
if false; then
new "Test SNMP table netSnmpIETFWGTable"
expectpart "$($snmptable $OID13)" 0 "Name1" "Name2"
if [ $snmp_debug ]; then
new "Test SNMP table netSnmpIETFWGTable"
expectpart "$($snmptable $OID13)" 0 "Name1" "Name2"
new "Test SNMP getnext netSnmpIETFWGTable"
expectpart "$($snmpgetnext $OID13)" 0 ""
new "Test SNMP getnext netSnmpIETFWGTable"
expectpart "$($snmpgetnext $OID13)" 0 ""
new "Test SNMP table netSnmpHostsTable"
expectpart "$($snmptable $OID18)" 0 "10.20.30.40" # Should verify all columns
new "Test SNMP table netSnmpHostsTable"
expectpart "$($snmptable $OID18)" 0 "10.20.30.40" # Should verify all columns
new "Test SNMP getnext netSnmpHostsTable $OID18"
expectpart "$($snmpgetnext $OID18)" 0 ""
new "Test SNMP getnext netSnmpHostsTable $OID18"
expectpart "$($snmpgetnext $OID18)" 0 ""
fi
new "Cleaning up"