From bcc0b5bd6e11a9fbc2fcb3c450fdb48bb85499e8 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 9 Feb 2020 14:54:42 +0100 Subject: snmp: output expected value on error --- scripts/cli/test_service_snmp.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/cli/test_service_snmp.py') diff --git a/scripts/cli/test_service_snmp.py b/scripts/cli/test_service_snmp.py index 5fd5eafcc..e9d04a1ae 100755 --- a/scripts/cli/test_service_snmp.py +++ b/scripts/cli/test_service_snmp.py @@ -78,7 +78,11 @@ class TestSNMPService(unittest.TestCase): else: expected += ',udp6:[{}]:161'.format(addr) - self.assertTrue(expected in config) + try: + self.assertTrue(expected in config) + except: + print("expected: {}".format(expected)) + print("config: {}".format(config)) # Check for running process self.assertTrue("snmpd" in (p.name() for p in process_iter())) -- cgit v1.2.3