dugite icon indicating copy to clipboard operation
dugite copied to clipboard

Slow tests fail on missing repository

Open webstech opened this issue 4 years ago • 2 comments

Two of the slow tests are failing on expect(result).toBe(GitError.HTTPSAuthenticationFailed). The result is 8 instead of 3. This happens at line 50 and 115. A dump of the result says the repo is not found:

{"exitCode": 128, "stderr": "Cloning into '.'...
    remote: Repository not found.
    fatal: repository 'https://github.com/shiftkey/repository-private.git/' not found
    ", "stdout": ""}

@shiftkey Did you delete the repo?

webstech avatar Aug 22 '21 23:08 webstech

@shiftkey Did you delete the repo?

Nope, it still exists.

shiftkey avatar Aug 23 '21 12:08 shiftkey

The failing tests appear to be related to the newish git credential manager. The test setup tries to use the GIT_ASKPASS env var to drive a failed authorization. Setting GCM_TRACE=1 shows the new credential manager is being used (with my login). Tried to set some local config to override globals but it seems I do not know git well enough to configure this.

git system config says:

credential.helper=manager-core

git global config says:

credential.helper=wincred

need to look into why wincred is still set.

Any ideas on how to configure this to force HTTPSAuthenticationFailed vs HTTPSRepositoryNotFound (due to valid login)? Replacing the private shiftkey repo with my own private repo works due to the valid login. ie, the clone works but the expects fails.

webstech avatar Aug 24 '21 04:08 webstech