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

Function TestAssetNameRejectsUnreleasedPlatform

internal/update/update_test.go:333–348  ·  view source on GitHub ↗

TestAssetNameRejectsUnreleasedPlatform: the inverse, anything goreleaser doesn't build for must return ok=false so Check short-circuits before the network, instead of leading Apply down a confusing path on a 404.

(t *testing.T)

Source from the content-addressed store, hash-verified

331// doesn't build for must return ok=false so Check short-circuits before the
332// network, instead of leading Apply down a confusing path on a 404.
333func TestAssetNameRejectsUnreleasedPlatform(t *testing.T) {
334 cases := [][2]string{
335 {"plan9", "amd64"},
336 {"plan9", "riscv"},
337 {"freebsd", "amd64"},
338 {"openbsd", "arm64"},
339 {"linux", "386"},
340 {"linux", "riscv64"},
341 {"darwin", "386"},
342 }
343 for _, c := range cases {
344 if asset, ok := assetName(c[0], c[1]); ok {
345 t.Errorf("%s/%s: assetName returned ok=true with %q - goreleaser doesn't publish for this combo, Apply would 404", c[0], c[1], asset)
346 }
347 }
348}
349
350// TestCheckReportsUpToDate: local hash matches the manifest → Check returns
351// false. The steady-state path that keeps the spinner quiet after a release.

Callers

nothing calls this directly

Calls 1

assetNameFunction · 0.85

Tested by

no test coverage detected