diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-01-30 22:24:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-30 22:24:11 +0200 |
| commit | 127949a9afa11fba8511e072a3e056a8f1b9eec7 (patch) | |
| tree | c028bb4bf7e91b36f69721d9ac1f17dde99c5930 | |
| parent | ecf497baeda77bfd040818c7bd2ad412cac76d66 (diff) | |
| parent | d34cf8a75bce76bee983c343e54ac43be7da6367 (diff) | |
Merge pull request #7970 from volta-networks/fix_snmp_topotest_test_oid_walk
tests: update snmp topotest api test_oid_walk
| -rw-r--r-- | tests/topotests/lib/snmptest.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/topotests/lib/snmptest.py b/tests/topotests/lib/snmptest.py index 910e901ade..1bf83c2aea 100644 --- a/tests/topotests/lib/snmptest.py +++ b/tests/topotests/lib/snmptest.py @@ -118,7 +118,7 @@ class SnmpTester(object): def test_oid_walk(self, oid, values, oids=None): results_dict, results_list = self.walk(oid) - print("res {}".format(results_dict)) + print("test_oid_walk: {} {}".format(oid, results_dict)) if oids is not None: index = 0 for oid in oids: @@ -127,4 +127,5 @@ class SnmpTester(object): index += 1 return True - return results_list == values + # Return true if 'values' is a subset of 'results_list' + return results_list[: len(values)] == values |
