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

Function skipOnAuthError

pkg/parser/remote_fetch_integration_test.go:151–160  ·  view source on GitHub ↗

skipOnAuthError skips the test if the error indicates missing authentication.

(t *testing.T, err error)

Source from the content-addressed store, hash-verified

149
150// skipOnAuthError skips the test if the error indicates missing authentication.
151func skipOnAuthError(t *testing.T, err error) {
152 t.Helper()
153 if err == nil {
154 return
155 }
156 errStr := err.Error()
157 if strings.Contains(errStr, "auth") || strings.Contains(errStr, "forbidden") || strings.Contains(errStr, "authentication token not found") {
158 t.Skip("Skipping test due to authentication requirements")
159 }
160}
161
162// TestCheckRemoteSymlink verifies that checkRemoteSymlink correctly classifies
163// directories, files, and nonexistent paths when called against the GitHub Contents API.

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected