MCPcopy Index your code
hub / github.com/codehamr/codehamr / withReleaseURLs

Function withReleaseURLs

internal/update/update_test.go:47–57  ·  view source on GitHub ↗

withReleaseURLs swaps checksumsURL and releaseBase for one test; safe only because these tests don't run in parallel.

(t *testing.T, base string)

Source from the content-addressed store, hash-verified

45// withReleaseURLs swaps checksumsURL and releaseBase for one test; safe only
46// because these tests don't run in parallel.
47func withReleaseURLs(t *testing.T, base string) {
48 t.Helper()
49 origCS := checksumsURL
50 origBase := releaseBase
51 checksumsURL = base + "/codehamr_checksums.txt"
52 releaseBase = base + "/"
53 t.Cleanup(func() {
54 checksumsURL = origCS
55 releaseBase = origBase
56 })
57}
58
59// hashOf returns the sha256 hex digest, matching goreleaser's manifest format.
60func hashOf(body []byte) string {

Calls

no outgoing calls

Tested by

no test coverage detected