MCPcopy Create free account
hub / github.com/cli/cli / TestClientUnsetRemoteResolutionPropagatesGitError

Function TestClientUnsetRemoteResolutionPropagatesGitError

git/client_test.go:1165–1177  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1163}
1164
1165func TestClientUnsetRemoteResolutionPropagatesGitError(t *testing.T) {
1166 // Given a client whose repository directory does not exist
1167 client := Client{RepoDir: filepath.Join(t.TempDir(), "missing")}
1168
1169 // When a remote resolution is unset
1170 err := client.UnsetRemoteResolution(t.Context(), "origin")
1171
1172 // Then the Git error is returned
1173 require.Error(t, err)
1174 var gitErr *GitError
1175 require.ErrorAs(t, err, &gitErr)
1176 assert.NotZero(t, gitErr.ExitCode)
1177}
1178
1179func TestClientSetRemoteBranchesLimitsTrackedBranches(t *testing.T) {
1180 // Given a repository that fetches every branch from a local remote

Callers

nothing calls this directly

Calls 3

UnsetRemoteResolutionMethod · 0.95
JoinMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected