Commit graph

2 commits

Author SHA1 Message Date
Tyler McGoffin
2b480daf7a Address PR feedback 2024-10-23 13:57:57 -07:00
Tyler McGoffin
0614d85027 Add acceptance tests for auth-setup-git and formattedStringToEnv helper func
To test this, I decided to look into the .gitconfig used for the test and
examine the credential helpers. However, the format of the git command is

`git config --get credential.<URL>.helper`

What's awkward about this is that the <URL> depends on the host the user
specified when running the tests, meaning I'd need to create a key like
credential.https://github.com.helper to access what I need while setting
this up.

There was no functionality for string formatting before, so I added the
command formattedStringToEnv which essentially wraps fmt.Sprintf() and
saves the string to an environment variable.

This allowed me to dynamically create the config key in the test.
2024-10-23 13:33:17 -07:00