-
Notifications
You must be signed in to change notification settings - Fork 8
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
libcnb-tests: Integration tests failing on main
when run locally on macOS
#706
Comments
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). |
So I presume this is happening since Rosetta puts the cache in IMO longer term we should consider changing |
#707) 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 the `app_dir_preprocessor` test: ``` ---- app_dir_preprocessor stdout ---- thread 'app_dir_preprocessor' panicked at libcnb-test/tests/integration_test.rs:189:13: assertion `left == right` failed left: ".\n./.cache\n./.cache/rosetta\n./Procfile\n./subdir1\n./subdir1/file2.txt\n./subdir1/subdir2\n./subdir1/subdir2/subdir3\n./subdir1/subdir2/subdir3/file3.txt\n" right: ".\n./Procfile\n./subdir1\n./subdir1/file2.txt\n./subdir1/subdir2\n./subdir1/subdir2/subdir3\n./subdir1/subdir2/subdir3/file3.txt\n" ``` In addition, it seems the newer Docker daemon now supports port 0, which was the port used by the `expose_port_invalid_port` test. 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. Fixes #706. GUS-W-14395756.
I would presume this is due to the recent update to Docker for Desktop for macOS, or else my upgrade to macOS 14.1 (which included some Rosetta changes).
It looks like Docker's Rosetta implementation now leaves cache files in
.cache/rosetta
which is breaking the directory listing assertion here:libcnb.rs/libcnb-test/tests/integration_test.rs
Lines 177 to 189 in cdd2eb4
As for the docker port test - it seems the Docker daemon now accepts port 0 when it didn't before.
Previously the Docker daemon would return this error:
This test was one I wrote to be thorough, but looking at it again now it seems pretty redundant (it's testing a slightly contrived scenario, and failures starting containers are already tested in several other ways), so I think we should just remove the test.
GUS-W-14395756.
The text was updated successfully, but these errors were encountered: