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

Function TestClientSetRemoteBranchesReportsMissingRemote

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

Source from the content-addressed store, hash-verified

1190}
1191
1192func TestClientSetRemoteBranchesReportsMissingRemote(t *testing.T) {
1193 // Given a repository without the named remote
1194 repo := newTestRepo(t)
1195
1196 // When its tracked branches are changed
1197 err := repo.client.SetRemoteBranches(t.Context(), "missing", "trunk")
1198
1199 // Then Git reports a semantic command failure
1200 require.Error(t, err)
1201 var gitErr *GitError
1202 require.ErrorAs(t, err, &gitErr)
1203 assert.NotZero(t, gitErr.ExitCode)
1204}
1205
1206func TestClientFetchUpdatesRemoteTrackingBranchInModifiedRepoDir(t *testing.T) {
1207 // Given a local remote with a trunk commit and a separate destination repository

Callers

nothing calls this directly

Calls 3

newTestRepoFunction · 0.85
SetRemoteBranchesMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected