Type
Files to change
testutil/testutil_test.go
tests/e2e/completions_test.go (new file)
Description
G4 — testutil.LoadFixture panic path untested
testutil/fixture.go:LoadFixture calls t.Fatalf when the fixture file cannot be read, but testutil/testutil_test.go only tests the happy path (fixture file exists and is readable). The failure path (non-existent file, permission error) is not exercised, which means the error message and the t.Fatalf call itself are untested. Add a subtest that calls LoadFixture with a path that does not exist and asserts that the test is marked as failed (using a testing.TB spy or t.Run with a fresh helper T).
G5 — No e2e test for rimba completion
rimba completion (shell completion generation) has no entry in tests/e2e/. Running rimba completion bash, rimba completion zsh, and rimba completion fish all produce output but are never exercised in the e2e suite. Add a tests/e2e/completions_test.go that:
- Builds the rimba binary
- Runs
rimba completion bash (and optionally zsh, fish)
- Asserts exit code 0 and that stdout contains known completion markers (e.g.,
complete for bash, compdef for zsh)
Acceptance
Bundles
Original candidates folded into this issue:
- G4 (
testutil/testutil_test.go): LoadFixture failure path (missing file → t.Fatalf) is not tested.
- G5 (
tests/e2e/): no e2e coverage for rimba completion subcommand.
Type
Files to change
testutil/testutil_test.gotests/e2e/completions_test.go(new file)Description
G4 —
testutil.LoadFixturepanic path untestedtestutil/fixture.go:LoadFixturecallst.Fatalfwhen the fixture file cannot be read, buttestutil/testutil_test.goonly tests the happy path (fixture file exists and is readable). The failure path (non-existent file, permission error) is not exercised, which means the error message and thet.Fatalfcall itself are untested. Add a subtest that callsLoadFixturewith a path that does not exist and asserts that the test is marked as failed (using atesting.TBspy ort.Runwith a fresh helperT).G5 — No e2e test for
rimba completionrimba completion(shell completion generation) has no entry intests/e2e/. Runningrimba completion bash,rimba completion zsh, andrimba completion fishall produce output but are never exercised in the e2e suite. Add atests/e2e/completions_test.gothat:rimba completion bash(and optionallyzsh,fish)completefor bash,compdeffor zsh)Acceptance
testutil_test.gocontains a subtest forLoadFixturewith a missing file path; test marked as failed by the helper.tests/e2e/completions_test.goexists and passes for at leastbashcompletion.make testandmake test-e2epass.Bundles
Original candidates folded into this issue:
testutil/testutil_test.go):LoadFixturefailure path (missing file →t.Fatalf) is not tested.tests/e2e/): no e2e coverage forrimba completionsubcommand.