tests: move Test_TraceeCapture from integration to e2e tests#5212
tests: move Test_TraceeCapture from integration to e2e tests#5212yanivagman wants to merge 1 commit intomainfrom
Conversation
This change addresses issue #5187 by refactoring the capture test from integration tests to the e2e test framework. The Test_TraceeCapture test uses testutils.NewRunningTracee which runs tracee as an external binary (dist/tracee). This pattern is consistent with e2e tests, not integration tests which run tracee in-process using testutils.StartTracee. Changes: - Move capture_test.go from tests/integration/ to tests/e2e-capture/ - Create e2e-capture-test.sh script to run the capture tests - Update run-e2e-tests GitHub action to include capture tests - Update failed test detection logic to include capture test failures The test is currently skipped due to known file capture bugs on certain architectures (see issue #5171). Once those bugs are fixed, the test will run as part of the e2e test suite. Fixes: #5187 Co-authored-by: yaniv <yaniv@aquasec.com>
|
Cursor Agent can help with this pull request. Just |
|
|
|
@cursoragent please review |
PR Review: tests: move Test_TraceeCapture from integration to e2e testsOverall Assessment: Looks Good ✓The PR correctly addresses issue #5187 by moving Review Details1.
|
| File | Status |
|---|---|
tests/e2e-capture/capture_test.go |
✓ Good |
tests/e2e-capture-test.sh |
✓ Good |
.github/actions/run-e2e-tests/action.yaml |
✓ Good |
tests/integration/capture_test.go (deleted) |
✓ Correct |
Recommendation
Approve - The changes are well-structured and correctly move the capture test to the e2e framework where it belongs. The test is currently skipped due to known bugs (#5171), so there's no risk of CI failures once this is merged.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5212 +/- ##
==========================================
+ Coverage 33.51% 35.44% +1.93%
==========================================
Files 250 239 -11
Lines 28908 31474 +2566
==========================================
+ Hits 9688 11157 +1469
- Misses 18609 19603 +994
- Partials 611 714 +103
🚀 New features to boost your workflow:
|
1. Explain what the PR does
Fixes #5187.
This PR addresses the miscategorization of
Test_TraceeCaptureby moving it fromtests/integrationto a newtests/e2e-capturedirectory. The test is an end-to-end test, as it usestestutils.NewRunningTraceeto run Tracee as an external binary, unlike true integration tests that run Tracee in-process.Changes include:
capture_test.gototests/e2e-capture/and updated its package.tests/e2e-capture-test.shto execute these new e2e capture tests..github/actions/run-e2e-tests/action.yamlto include the capture test in the CI workflow.2. Explain how to test it
To test the e2e capture tests locally:
Look for "E2E CAPTURE TESTS PASSED" or "E2E CAPTURE TESTS FAILED" in the output. Note that the test is currently skipped due to known BPF file capture bugs (see issue #5171).
3. Other comments
The
Test_TraceeCaptureis currently skipped due to known BPF file capture bugs, as detailed in #5171. Once #5171 is resolved, the skip can be removed, and this test will run as part of the e2e test suite.