Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit test for Uprobe in container #349

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

anfredette
Copy link
Contributor

@anfredette anfredette commented Dec 14, 2024

Add unit test for Uprobe in container

Also, move TestGetPods from uprobe-program_test.go into a separate
test_common.go file since it tests the common code used for multiple
program types.

Copy link

codecov bot commented Dec 14, 2024

Codecov Report

Attention: Patch coverage is 3.44828% with 84 lines in your changes missing coverage. Please review.

Project coverage is 27.18%. Comparing base (db645d4) to head (6828e71).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
controllers/bpfman-agent/test_common.go 3.27% 59 Missing ⚠️
controllers/bpfman-agent/containers.go 0.00% 16 Missing ⚠️
cmd/bpfman-agent/main.go 0.00% 6 Missing ⚠️
controllers/bpfman-agent/tc-program.go 0.00% 1 Missing ⚠️
controllers/bpfman-agent/tcx-program.go 0.00% 1 Missing ⚠️
controllers/bpfman-agent/xdp-program.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #349      +/-   ##
==========================================
- Coverage   27.66%   27.18%   -0.48%     
==========================================
  Files          87       88       +1     
  Lines        7503     7786     +283     
==========================================
+ Hits         2076     2117      +41     
- Misses       5227     5460     +233     
- Partials      200      209       +9     
Flag Coverage Δ
unittests 27.18% <3.44%> (-0.48%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Also, move TestGetPods from uprobe-program_test.go into a separate
test_common.go file since it tests the common code used for multiple
program types.

Signed-off-by: Andre Fredette <[email protected]>
@anfredette anfredette force-pushed the unit-test-containers branch 2 times, most recently from 57fed93 to 6828e71 Compare December 15, 2024 14:41
@anfredette anfredette marked this pull request as ready for review December 15, 2024 14:52
Copy link
Contributor

@Billy99 Billy99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@mergify mergify bot merged commit 9191140 into bpfman:main Dec 16, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants