diff --git a/tests/checks/integration/test_snmp.py b/tests/checks/integration/test_snmp.py index 458407b332..b30f26bb4d 100644 --- a/tests/checks/integration/test_snmp.py +++ b/tests/checks/integration/test_snmp.py @@ -288,11 +288,13 @@ def test_invalid_metric(self): 'instances': [self.generate_instance_config(self.INVALID_METRICS)] } self.run_check(config) - self.service_checks = self.wait_for_async('get_service_checks', 'service_checks', 1) + self.warnings = self.wait_for_async('get_warnings', 'warnings', 1) - self.assertWarning("Fail to collect metrics: No symbol IF-MIB::noIdeaWhatIAmDoingHere at", + self.assertWarning("Fail to collect metrics: No symbol IF-MIB::noIdeaWhatIAmDoingHere", count=1, exact_match=False) + self.service_checks = self.wait_for_async('get_service_checks', 'service_checks', 1) + # # Test service check self.assertServiceCheck("snmp.can_check", status=AgentCheck.CRITICAL, tags=self.CHECK_TAGS, count=1) @@ -311,11 +313,13 @@ def test_network_failure(self): 'instances': [instance] } self.run_check(config) - self.service_checks = self.wait_for_async('get_service_checks', 'service_checks', 1) + self.warnings = self.wait_for_async('get_warnings', 'warnings', 1) self.assertWarning("No SNMP response received before timeout for instance localhost", count=1) # Test service check + self.service_checks = self.wait_for_async('get_service_checks', 'service_checks', 1) self.assertServiceCheck("snmp.can_check", status=AgentCheck.CRITICAL, tags=self.CHECK_TAGS, count=1) + self.coverage_report()