Skip to content

Increase kubeactions patch coverage#3100

Closed
frank-spano wants to merge 2 commits into
frank.spano-kube-actionsfrom
dd/tests/kubeactions-builder-coverage
Closed

Increase kubeactions patch coverage#3100
frank-spano wants to merge 2 commits into
frank.spano-kube-actionsfrom
dd/tests/kubeactions-builder-coverage

Conversation

@frank-spano

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds targeted unit tests to cover the recently changed kubeactions feature behavior and DatadogAgent test builder behavior so the PR patch is fully exercised.

Motivation

Patch coverage for PR #3099 showed uncovered lines in kubeactions feature no-op manager methods and the new KubeActions builder helpers. This change ensures those modified lines are executed and asserted by tests.

Additional Notes

Changes are intentionally limited to tests only.

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

  • go test ./internal/controller/datadogagent/feature/kubeactions ./pkg/testutils
  • Added test coverage for:
    • internal/controller/datadogagent/feature/kubeactions/feature.go no-op manager methods (ManageSingleContainerNodeAgent, ManageNodeAgent, ManageClusterChecksRunner, ManageOtelAgentGateway)
    • pkg/testutils/builder.go KubeActions initialization and enabled flag mutation via WithKubeActionsEnabled

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)

PR by Bits - View session in Datadog

Comment @DataDog to request changes

@frank-spano frank-spano requested a review from a team as a code owner June 5, 2026 18:11
@datadog-official

datadog-official Bot commented Jun 5, 2026

Copy link
Copy Markdown

View session in Datadog

Bits Code status: ✅ Done

Comment @DataDog to request changes

@datadog-official

Copy link
Copy Markdown

I can only run on private repositories.

@datadog-official

datadog-official Bot commented Jun 5, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 2 Pipeline jobs failed

pull request linter | Check Milestone   View in Datadog   GitHub Actions

pull request linter | build   View in Datadog   GitHub Actions

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0d650f7 | Docs | Datadog PR Page | Give us feedback!

@frank-spano frank-spano force-pushed the frank.spano-kube-actions branch from 6eb9bac to 7ac41c5 Compare June 5, 2026 18:13
@frank-spano frank-spano requested review from a team as code owners June 5, 2026 18:13
@frank-spano frank-spano closed this Jun 5, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.91837% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.76%. Comparing base (19e90a6) to head (0d650f7).
⚠️ Report is 3 commits behind head on frank.spano-kube-actions.

Files with missing lines Patch % Lines
...roller/datadogagent/feature/kubeactions/feature.go 95.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                     Coverage Diff                      @@
##           frank.spano-kube-actions    #3100      +/-   ##
============================================================
+ Coverage                     43.62%   43.76%   +0.13%     
============================================================
  Files                           350      352       +2     
  Lines                         30089    30138      +49     
============================================================
+ Hits                          13127    13190      +63     
+ Misses                        16090    16068      -22     
- Partials                        872      880       +8     
Flag Coverage Δ
unittests 43.76% <95.91%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/controller/datadogagent/controller.go 48.00% <ø> (ø)
...ntroller/datadogagent/feature/kubeactions/const.go 100.00% <100.00%> (ø)
...rnal/controller/datadogagentinternal/controller.go 0.00% <ø> (ø)
pkg/testutils/builder.go 2.19% <100.00%> (+2.19%) ⬆️
...roller/datadogagent/feature/kubeactions/feature.go 95.00% <95.00%> (ø)

... and 1 file 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 19e90a6...0d650f7. Read the comment docs.

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

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.

2 participants