MCPcopy Create free account
hub / github.com/github/gh-aw / TestGetLatestBranchCommitSHA_Integration

Function TestGetLatestBranchCommitSHA_Integration

pkg/cli/update_integration_test.go:444–450  ·  view source on GitHub ↗

TestGetLatestBranchCommitSHA_Integration verifies fetching the latest commit SHA for a branch.

(t *testing.T)

Source from the content-addressed store, hash-verified

442
443// TestGetLatestBranchCommitSHA_Integration verifies fetching the latest commit SHA for a branch.
444func TestGetLatestBranchCommitSHA_Integration(t *testing.T) {
445 skipWithoutGitHubAuth(t)
446
447 sha, err := getLatestBranchCommitSHA(context.Background(), "actions/checkout", "main")
448 require.NoError(t, err, "Should fetch latest commit SHA for actions/checkout main branch")
449 assert.True(t, IsCommitSHA(sha), "Result should be a 40-char commit SHA, got: %s", sha)
450}
451
452// --- Org Dry-Run Integration Tests ---
453

Callers

nothing calls this directly

Calls 4

skipWithoutGitHubAuthFunction · 0.85
getLatestBranchCommitSHAFunction · 0.85
IsCommitSHAFunction · 0.85
BackgroundMethod · 0.80

Tested by

no test coverage detected