(t *testing.T)
| 555 | } |
| 556 | |
| 557 | func TestClientReadBranchConfigPropagatesGitError(t *testing.T) { |
| 558 | // Given a client whose repository directory no longer exists |
| 559 | repo := newTestRepo(t) |
| 560 | require.NoError(t, os.RemoveAll(repo.dir)) |
| 561 | |
| 562 | // When branch configuration is read |
| 563 | branchConfig, err := repo.client.ReadBranchConfig(t.Context(), "trunk") |
| 564 | |
| 565 | // Then the repository error is preserved |
| 566 | require.Error(t, err) |
| 567 | var gitError *GitError |
| 568 | require.ErrorAs(t, err, &gitError) |
| 569 | assert.Equal(t, 128, gitError.ExitCode) |
| 570 | assert.Empty(t, branchConfig) |
| 571 | } |
| 572 | |
| 573 | func TestParseBranchConfig(t *testing.T) { |
| 574 | tests := []struct { |
nothing calls this directly
no test coverage detected