Fix libcnb-tests's integration tests with newer Rosetta/Docker Desktop #707
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.
libcnb-test's own integration tests were failing locally when run using newer versions of Docker Desktop and/or the Rosetta feature in macOS 14.1.
Rosetta now creates a
$HOME/.cache/rosetta
directory that was breaking the directory listing assertions in theapp_dir_preprocessor
test:In addition, it seems the newer Docker daemon now no longer rejects port 0, which was the port used by the
expose_port_invalid_port
test. Previously the Docker daemon would return this error:There isn't another bogus port we can use (since the data types use an unsigned 16 bit int, whose max value is the same as the max port allowed - so we can't use a port like 99999), and the test itself is somewhat redundant, since failing
start_container()
is already tested in other ways.As such the
expose_port_invalid_port
test has been removed.It's worth noting that neither of these failures were made worse by the switch from Bollard to the Docker CLI, since that only changed the Docker client, whereas both of these failures were due to a new version of the daemon (and/or VM components that Docker for Desktop uses to run the daemon) and Rosetta.
Fixes #706.
GUS-W-14395756.