diff --git a/datadog_checks_base/datadog_checks/base/stubs/aggregator.py b/datadog_checks_base/datadog_checks/base/stubs/aggregator.py index b7cdeab3df127..47b11fe8af19b 100644 --- a/datadog_checks_base/datadog_checks/base/stubs/aggregator.py +++ b/datadog_checks_base/datadog_checks/base/stubs/aggregator.py @@ -10,6 +10,7 @@ from six import iteritems +from datadog_checks.base.constants import ServiceCheck from ..utils.common import ensure_unicode, to_native_string from .common import HistogramBucketStub, MetricStub, ServiceCheckStub from .similar import build_similar_elements_msg @@ -123,6 +124,9 @@ def submit_metric_e2e( self._metrics[name].append(MetricStub(name, mtype, value, tags, hostname, device)) def submit_service_check(self, check, check_id, name, status, tags, hostname, message): + if status == ServiceCheck.OK and message: + raise Exception("Expected empty message on OK service check") + check_tag_names(name, tags) self._service_checks[name].append(ServiceCheckStub(check_id, name, status, tags, hostname, message))