Skip to content

Conversation

@levan-m
Copy link
Contributor

@levan-m levan-m commented Jan 14, 2026

What does this PR do?

Mostly non-functional change:

  • Create common test case struct.
  • Extracts test execution and some common code (like client creation) into separate function.
  • Change helpers to assert instead of returning error.
  • Otel test assertion fixes.
  • Added focus field to test case to ease debugging of a single test.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

  • Agent: vX.Y.Z
  • Cluster Agent: vX.Y.Z

Describe your test plan

Write there any instructions and details you may have to test your PR.

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label
  • All commits are signed (see: signing commits)

@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.38%. Comparing base (f2d7517) to head (585fa54).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2492      +/-   ##
==========================================
+ Coverage   37.98%   38.38%   +0.39%     
==========================================
  Files         298      299       +1     
  Lines       25029    25413     +384     
==========================================
+ Hits         9508     9754     +246     
- Misses      14796    14920     +124     
- Partials      725      739      +14     
Flag Coverage Δ
unittests 38.38% <ø> (+0.39%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2d7517...585fa54. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@levan-m levan-m force-pushed the levan-m/controller-test-refactor branch from cbfa63d to 585fa54 Compare January 14, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants