Skip to content

Include api module in unit tests#3140

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
tbavelier/include-api-in-gotest
Jun 15, 2026
Merged

Include api module in unit tests#3140
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
tbavelier/include-api-in-gotest

Conversation

@tbavelier

Copy link
Copy Markdown
Member

What does this PR do?

Updates the gotest Makefile target to run unit tests for both the root module and the separate api module.

Motivation

go test ./... from the repository root does not include packages under api/ because api is a separate Go module. This lets API test assertion failures pass make ci-test unnoticed.

Additional Notes

None.

Minimum Agent Versions

No minimum Agent or Cluster Agent version changes.

  • Agent: N/A
  • Cluster Agent: N/A

Describe your test plan

  • make -n gotest
  • go test ./api/...
  • go test ./... ./api/... -run '^$' -coverprofile /tmp/datadog-operator-api-gotest-cover.out

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

codecov-commenter commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.83%. Comparing base (d5cdf64) to head (7da252f).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3140      +/-   ##
==========================================
+ Coverage   43.59%   43.83%   +0.23%     
==========================================
  Files         354      375      +21     
  Lines       30224    30581     +357     
==========================================
+ Hits        13177    13404     +227     
- Misses      16176    16268      +92     
- Partials      871      909      +38     
Flag Coverage Δ
unittests 43.83% <ø> (+0.23%) ⬆️

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


Continue to review full report in Codecov by Harness.

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

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

@datadog-prod-us1-6

This comment has been minimized.

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