MCPcopy Create free account
hub / github.com/cli/cli / expectedFilePath

Function expectedFilePath

pkg/cmd/attestation/download/download_test.go:27–36  ·  view source on GitHub ↗
(tempDir string, digestWithAlg string)

Source from the content-addressed store, hash-verified

25var artifactPath = test.NormalizeRelativePath("../test/data/sigstore-js-2.1.0.tgz")
26
27func expectedFilePath(tempDir string, digestWithAlg string) string {
28 var filename string
29 if runtime.GOOS == "windows" {
30 filename = fmt.Sprintf("%s.jsonl", strings.ReplaceAll(digestWithAlg, ":", "-"))
31 } else {
32 filename = fmt.Sprintf("%s.jsonl", digestWithAlg)
33 }
34
35 return test.NormalizeRelativePath(fmt.Sprintf("%s/%s", tempDir, filename))
36}
37
38func TestNewDownloadCmd(t *testing.T) {
39 testIO, _, _, _ := iostreams.Test()

Callers 1

TestRunDownloadFunction · 0.85

Calls 1

NormalizeRelativePathFunction · 0.92

Tested by

no test coverage detected