Skip to content

Add tests for handling missing and non-executable test.sh in build process.#5

Merged
rohitpaulk merged 4 commits into
mainfrom
add-tests-missing-non-executable-test.sh
Dec 17, 2025
Merged

Add tests for handling missing and non-executable test.sh in build process.#5
rohitpaulk merged 4 commits into
mainfrom
add-tests-missing-non-executable-test.sh

Conversation

@rohitpaulk

@rohitpaulk rohitpaulk commented Dec 17, 2025

Copy link
Copy Markdown
Member

Note

Validate presence/executability of tester test.sh, add tests for failures, broaden Dockerfile distro handling, and bump language fixtures.

  • Builder (Go):
    • Validate tester_dir/test.sh exists and is executable before building; return internal errors if missing/invalid.
  • Tests:
    • Add cases for missing and non-executable test.sh with assertions on error logs.
    • Allow injecting tester_dir into BuildImageCommandRunner#run.
  • Dockerfile processing:
    • Broaden detection to include debian, noble, trixie; clarify error message for unknown FROM lines.
  • Fixtures/Makefile:
    • Update Redis repo commit and switch fixtures to ruby-3.4, rust-1.91, go-1.25; adjust CodeFixtures and copy paths accordingly.

Written by Cursor Bugbot for commit 1f3adae. This will update automatically on new commits. Configure here.

flunk "Expected build to fail with missing test.sh"
rescue
# Expected to fail
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Bare rescue catches flunk exception masking test failures

The bare rescue catches all StandardError subclasses, including Minitest::Assertion raised by flunk. If run_script! unexpectedly succeeds, flunk is called but immediately caught by the rescue block, causing the test to continue rather than fail with the intended message. The test would eventually fail at subsequent assertions but with a confusing error message, making debugging harder. The rescue block needs to specify the expected exception type (like RuntimeError) to avoid swallowing the flunk assertion.

Additional Locations (1)

Fix in Cursor Fix in Web

@rohitpaulk rohitpaulk merged commit 36e38ec into main Dec 17, 2025
2 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.

1 participant