-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Running the test suite writes garbage to ~/.gitconfig
#2604
Comments
Looks like the culprit is the tests here: https://github.com/runatlantis/atlantis/blob/master/server/events/git_cred_writer_test.go#L128-L154 Based on
Well, running in Docker gets me this result, so .. Close but no cigar.
EDIT: Paying attention, I see this is a different test that's failing and the test also fails on unmodified code. I'll try again later, or make an actual PR. |
(And no, this is only part of the solution because this only reads from a new place, and |
The tests would mutate $HOME/.gitconfig and $HOME/.git-credentials. Set the HOME environment variable to a suitable temporary directory before running git commands that mutate the global config. Fixes runatlantis#2604
The tests would mutate $HOME/.gitconfig and $HOME/.git-credentials. Set the HOME environment variable to a suitable temporary directory before running git commands that mutate the global config. Fixes #2604
The tests would mutate $HOME/.gitconfig and $HOME/.git-credentials. Set the HOME environment variable to a suitable temporary directory before running git commands that mutate the global config. Fixes #2604
) The tests would mutate $HOME/.gitconfig and $HOME/.git-credentials. Set the HOME environment variable to a suitable temporary directory before running git commands that mutate the global config. Fixes runatlantis#2604
) The tests would mutate $HOME/.gitconfig and $HOME/.git-credentials. Set the HOME environment variable to a suitable temporary directory before running git commands that mutate the global config. Fixes runatlantis#2604
While working on PR #2599 I ran the test suite several times. Later, when I moved on to other work, I found myself unable to run
terraform init
due to git wanting a password to clone repositories. After looking through my git config I found the following new entries:Which traced back to Atlantis' test suite. Rather than overwriting developers config files the test suite should set some combination of
GIT_CONFIG
andGIT_CONFIG_GLOBAL
to point git at a clean, temporary location.The text was updated successfully, but these errors were encountered: