libcnb-test: Check the exit code of pack sbom download
#520
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.
Previously if the
pack sbom download
command exited non-zero,TestContext::download_sbom_files
would ignore the error and return anSbomFiles
referencing an empty directory.Now, such errors will result in a test panic showing the stdout/stderr from pack - like already occurs for errors during
pack build
.I tried writing an integration test for this, however wasn't able to find an easy way to make
pack sbom download
fail (it appears to succeed even for images that don't have any SBOMs for example, and I don't want to resort to having to make manualdocker rmi <image>
calls etc). However the implementation is already tested via thepack build
consumer, so this could be worse.Fixes #519.
GUS-W-11924792.