TestResolveLatestRef_BranchIntegration verifies that a branch name resolves to the latest commit SHA for that branch.
(t *testing.T)
| 125 | // TestResolveLatestRef_BranchIntegration verifies that a branch name resolves |
| 126 | // to the latest commit SHA for that branch. |
| 127 | func TestResolveLatestRef_BranchIntegration(t *testing.T) { |
| 128 | skipWithoutGitHubAuth(t) |
| 129 | |
| 130 | // Use a well-known branch on a public repo |
| 131 | latestRef, err := resolveLatestRef(context.Background(), "actions/checkout", "main", false, true, 0) |
| 132 | require.NoError(t, err, "Should resolve latest commit for branch 'main'") |
| 133 | |
| 134 | // The result should be a 40-char commit SHA |
| 135 | assert.True(t, IsCommitSHA(latestRef), "Branch resolution should return a commit SHA, got: %s", latestRef) |
| 136 | } |
| 137 | |
| 138 | // TestResolveLatestRef_CommitSHAIntegration verifies that a commit SHA resolves |
| 139 | // to the latest commit from the default branch. |
nothing calls this directly
no test coverage detected