Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Whilst the unit tests for this repository are very comprehensive, much of the end buildpack behaviour depends on Pack CLI /
lifecycle
/ the buildpack API version, which aren't tested by the unit tests. For example Buildpack API 0.6 changed the default process handling in a breaking way.Now that libcnb-test has added support for more methods of invoking the built containers (see heroku/libcnb.rs#366), we are able to add integration tests for more than just a single
web
process example.This PR:
ureq
/ making HTTPS requests to theweb
process, in favour of a simplerecho
/ logs output based approach. The only reason the former approach was used was because of the "valid Procfile but not valid YAML" case (see 741bbc0), however that is now tested via a simplerecho
fixture that includes the offending"key: value"
substring, rather than thesocat
example command.tempfile
/ manually writing files in the unit tests, in favour of reading files from the fixtures directory.indoc!
to assert against multi-line log output strings, to make the end output more clearly visible from the test, and also reduce the chance of false positives (for example,Procfile declares types -> web
would previously successfully match againstProcfile declares types -> web, something-else
since there was no end of line marker).ignore = "reason"
support in Rust 1.61, to make it clearer why (integration) tests are being skipped when runningcargo test
..buildpacks(vec![BuildpackReference::Crate])
calls, since the current buildpack is the default when usinglibcnb-test
'srun_test()
.RUST_BACKTRACE=1
from the Circle CI configs, since in general the backtraces are noisy (making it harder to read the actual error) and add little value over the file+line number that's already output in the standard error message. In rare scenarios where the backtrace is actually useful, it can be enabled locally, or on a Circle CI run with a debugging commit pushed to the PR etc.heroku/builder:22
to the trusted builders list, since otherwise it slows down builds, and also means log output has additional prefixes, which mess up the multi-line assertions. Longer term we will add this builder to Pack's built-in trusted builders list, and also makelibcnb-test
pass--trust-builder
to thepack build
command:libcnb-test
should pass--trust-builder
topack build
libcnb.rs#407GUS-W-11311966.