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

Verify .NET runtime dependencies #50

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

runesoerensen
Copy link
Contributor

@runesoerensen runesoerensen commented Mar 2, 2025

This PR:

Also see heroku/base-images#346 (review).

@runesoerensen runesoerensen force-pushed the verify-runtime-dependencies branch 3 times, most recently from ad94542 to b6c1050 Compare March 2, 2025 05:50
@runesoerensen runesoerensen force-pushed the verify-runtime-dependencies branch from ee392c5 to 89bef75 Compare March 2, 2025 06:02
@runesoerensen runesoerensen marked this pull request as ready for review March 2, 2025 06:04
@runesoerensen runesoerensen requested a review from a team as a code owner March 2, 2025 06:04
@@ -40,6 +40,8 @@
remote: Procfile declares types -> \\(none\\)
remote: Default types for buildpack -> foo
REGEX

expect(app.run('bin/test-runtime.sh')).to match('All dynamically linked libraries were found.')
Copy link
Member

@edmorley edmorley Mar 2, 2025

Choose a reason for hiding this comment

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

Worth noting app.run() doesn't check exit status by default, so if the success string match were ever removed, this would need to then assert against $?.exitstatus or $?.success?, per:
https://github.com/heroku/hatchet/?tab=readme-ov-file#build-versus-run-testing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah so an earlier version actually did check the exit status as suggested in the Hatchet docs, but caused RuboCop to balk at the use of $? (rather than $CHILD_STATUS). I lazily ended up just verifying the success output string match as you noticed :)

I've added it back in this commit using the $CHILD_STATUS alias for $?, and preferring be_success + be_zero predicate matchers.

Perhaps I should also submit a PR to update the Hatchet docs/README/templates to prefer the more readable alias and predicate matchers instead? Seems this would involve updating at least:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants