Skip to content

Commit ad3a759

Browse files
nginx: tighten discovery E2E metric assertions from at_least=0 to at_least=1
at_least=0 can never fail — zero metrics always satisfies the condition, so the test only verified the agent connected, not that discovery rendered a working instance that actually scrapes metrics. at_least=1 ensures a regression where discovery connects but emits nothing is caught loudly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a6c9f65 commit ad3a759

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

nginx/tests/test_e2e.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ def test_e2e_discovery(dd_agent_check_discovery):
2727
aggregator = dd_agent_check_discovery(check_rate=True)
2828

2929
for m in ('nginx.net.conn_dropped_per_s', 'nginx.net.conn_opened_per_s', 'nginx.net.request_per_s'):
30-
aggregator.assert_metric(m, at_least=0)
30+
aggregator.assert_metric(m, at_least=1)
3131
for m in ('nginx.net.writing', 'nginx.net.reading', 'nginx.net.waiting', 'nginx.net.connections'):
32-
aggregator.assert_metric(m, at_least=0)
32+
aggregator.assert_metric(m, at_least=1)
3333

3434
aggregator.assert_service_check('nginx.can_connect', status=Nginx.OK)
3535

0 commit comments

Comments
 (0)