-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix integration tests #114
Conversation
Without this, Nix clears the environment, and then the VAULT_* variables that are set by integration_test.sh do not get propagated properly. Also, use the localhost ip instead of "localhost", because for some reason, "localhost" fails to resolve on my machine.
Would be good to also run these on CI, but this is difficult for me to add because Semaphore doesn’t seem to run on pull requests that I open. |
Hi! I've enabled "approval mode" for Semaphore now, so the CI should run if we comment the following on a PR: /sem-approve |
Reopening this PR to make it actually work. |
/sem-approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the tests also work on CI.
Thanks for fixing this!
@OpsBotPrime merge |
@OpsBotPrime driemaal is scheepsrecht |
Pull request approved for merge by @maartenberg, rebasing now. |
Rebased as fb2de1f, waiting for CI … |
I was unable to run the integration tests, for a few reasons:
vault secrets disable
fails withWhen I change
localhost
to127.0.0.1
this error goes away.The
VAULT_*
variables set inintegration_test.sh
do not propagate into Vaultenv when Stack uses Nix; it clears the environment, unless we pass--no-nix-pure
.Python 3.7 was hard-coded. Add Python to the Nix development environment instead.
In the Python integration test,
subprocess.run
withenv
set lost the originalPATH
, and whenvault
is taken from the Nix store, we need to preserve thatPATH
.With these changes, I can run the integration tests, and they all pass.