Repository navigation
fix: run functional tests on macOS docker desktop - #508
Merged
Merged
Conversation
Docker Desktop on macOS does not share /tmp, so the single-file bind mount of the vault config in start.sh silently became an empty directory in the container and vault failed with "A storage backend must be specified". Pass the config through VAULT_LOCAL_CONFIG instead so no host path sharing is required; this works on both macOS and Linux CI. test_userpass_no_policy.yml was the only test using the uri module, whose Python ssl state gets corrupted under OBJC_DISABLE_INITIALIZE_FORK_SAFETY on macOS, failing every request with "[ASN1: NOT_ENOUGH_DATA]". Shell out to curl for that POST to avoid the broken code path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Terry Howe <terrylhowe@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Two macOS-specific issues prevented
tox -e py39(the functional suite) from passing on Docker Desktop; both are fixed here. The suite now runs green end to end on macOS and remains unchanged for Linux CI.1. Vault container wouldn't start (
FAIL code 1)functional/start.shbind-mounted the vault config from a temp file in/tmp. Docker Desktop on macOS does not share/tmp, so the single-file mount silently became an empty directory inside the container, vault saw no config, and died with "A storage backend must be specified" — failing before any test ran.Fix: pass the config through the
VAULT_LOCAL_CONFIGenv var instead of a bind mount, so no host path sharing is required.2. Intermittent
ASN1: NOT_ENOUGH_DATAintest_userpass_no_policy.ymlThis was the only test using Ansible's
urimodule. UnderOBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES(set by tox) the module's Pythonsslstate gets corrupted across forks and every request to the plaintext vault port fails. A retry did not help — the corruption is persistent within the task.Fix: shell out to
curlfor that raw POST (which the test's purpose — omitting the policies field — is well-suited to), sidestepping the broken Python-ssl-under-fork path.Test plan
tox -e py39→py39: OK/congratulations :)(full suite, fresh container) on macOS.🤖 Generated with Claude Code