MCPcopy
hub / github.com/cli/cli / fillCredentials

Function fillCredentials

pkg/cmd/auth/shared/gitcredentials/updater_test.go:27–41  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25}
26
27func fillCredentials(t *testing.T) string {
28 gc := &git.Client{}
29 fillCmd, err := gc.Command(context.Background(), "credential", "fill")
30 require.NoError(t, err)
31
32 fillCmd.Stdin = bytes.NewBufferString(heredoc.Docf(`
33 protocol=https
34 host=%s
35 `, "github.com"))
36
37 b, err := fillCmd.Output()
38 require.NoError(t, err)
39
40 return string(b)
41}
42
43func TestUpdateAddsNewCredentials(t *testing.T) {
44 // Given we have an isolated git config and we're using the built in store credential helper

Callers 2

Calls 2

CommandMethod · 0.95
OutputMethod · 0.65

Tested by

no test coverage detected