Repository navigation
fix(tests): support skipped tests in cozytest - #3933
Immanuel Tikhonov (immanuwell) wants to merge 1 commit into
Conversation
Assisted-By: GPT-5 <[email protected]> Signed-off-by: immanuwell <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthrough
ChangesSkip handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change makes skipped tests report their reason and continue correctly, with coverage for the behavior; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant BatsTest
participant TestFixture
participant cozytest.sh
BatsTest->>TestFixture: create skipped and passing tests
BatsTest->>cozytest.sh: run fixture
cozytest.sh->>TestFixture: execute test subshell
TestFixture->>cozytest.sh: call skip with reason
cozytest.sh->>cozytest.sh: record marker and report skipped test
cozytest.sh->>TestFixture: execute following passing test
cozytest.sh-->>BatsTest: return successful suite status
BatsTest->>BatsTest: verify output and skipped-body suppression
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
Immanuel Tikhonov (@immanuwell) NOT LGTM: the change is useful, but it needs a rebase and the commit trailer has to change.
The problem is real on main: run-kubernetes-kvm-exits_test.bats calls skip when run as root, and e2e-install-cozystack.bats calls it on clusters without the ValidatingAdmissionPolicy API. cozytest.sh defines no skip, so both fail with exit 127. #3849 moves the unit lane to real Bats, but cozytest.sh stays as the runner for the live-cluster suites and the POSIX pass, so this is not moot. Your test passes on the PR head.
Two blockers:
- The commit carries
Assisted-By: GPT-5 <[email protected]>. The repo accepts onlyAssisted-by: LLM, with no model or vendor name (docs/agents/contributing.md, AI Agent Attribution). TheCommit trailerscheck fails on any other value. hack/cozytest.shhas changed a lot since your base and the branch conflicts with main. Please rebase and re-runhack/cozytest-skip.batsagainst the new runner.
A small one: the test only runs rm -rf "$dir" on success, so a failing run leaves its temp dir behind.
|
Immanuel Tikhonov (@immanuwell) Since #3849 the unit suites run under real Bats, which has skip built in, so the cozytest shim is no longer needed for this. Thanks for the PR. Closing. |
What this PR does
cozytest.shcurrently treats Batsskipas a missing command. Root runs hit this inrun-kubernetes-kvm-exits_test.batsand fail instead of skipping. Repro onmain:This adds proper skip handling, reports the reason, and continues with the next test.
A small end to end test covers it too
Fixes #3827
Screenshots
Not a UI change.
Downstream repositories
Release note