Re: [PATCH 0/4] osxkeychain: bring in line with other credential helpers
- From
Robert Coup <robert.coup@koordinates.com>
- Date
- Apr 2, 2024, 14:54 UTC
- Message-ID
- <CAFLLRp+Dd5M5Y+uoSpPk8-xpFHc_kBJJQfiHr4rt34ey0HAXbg@mail.gmail.com>
- In-Reply-To
- <98F1A6E9-4553-48BE-830C-8FDA9F3B5744@boanderson.me>
Hi Bo,
On Tue, 2 Apr 2024 at 14:53, Bo Anderson <mail@boanderson.me> wrote:
> > The test script does not interact well with the env filtering. This was the case before this change too.
I guess without writing a helper-specific test or having some per-helper-setup thing it's a bit tricky.
Show 5 quoted lines
> To interact with your default keychain, you will need: > > GIT_TEST_CREDENTIAL_HELPER_SETUP="export HOME=$HOME” > > This is because the default macOS user keychain is local to your home directory - that’s why it’s giving errors about not finding any.
And with that, the tests all pass :-) Comparing with master where 7/21 failed.
Tested-by: Robert Coup <robert.coup@koordinates.com>
Could we document that setup step somewhere? I guess the simplest is probably just to put it in the header of t/t0303-credential-external.sh; maybe along the lines of the patch below.
Rob :)
diff --git a/t/t0303-credential-external.sh b/t/t0303-credential-external.sh index 095574bfc6..e4e693b233 100755 --- a/t/t0303-credential-external.sh +++ b/t/t0303-credential-external.sh @@ -27,6 +27,13 @@ timeout, you can test that feature with: If your helper requires additional setup before the tests are started, you can set GIT_TEST_CREDENTIAL_HELPER_SETUP to a sequence of shell commands. + +- osxkeychain: + + Because the default macOS user keychain is local to your home + directory, you will need: + + GIT_TEST_CREDENTIAL_HELPER_SETUP="export HOME=$HOME” ' . ./test-lib.sh