From 4f2f71950ec3ce68b56f3214ae2dbaa10f4d8644 Mon Sep 17 00:00:00 2001 From: Meredith Lancaster Date: Mon, 18 Mar 2024 10:51:46 -0600 Subject: [PATCH] use normalized path for cli test arg Signed-off-by: Meredith Lancaster --- pkg/cmd/attestation/inspect/inspect_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/attestation/inspect/inspect_test.go b/pkg/cmd/attestation/inspect/inspect_test.go index 31cfd6f97..ba82d1b39 100644 --- a/pkg/cmd/attestation/inspect/inspect_test.go +++ b/pkg/cmd/attestation/inspect/inspect_test.go @@ -2,6 +2,7 @@ package inspect import ( "bytes" + "fmt" "net/http" "testing" @@ -48,7 +49,7 @@ func TestNewInspectCmd(t *testing.T) { }{ { name: "Invalid digest-alg flag", - cli: "../test/data/sigstore-js-2.1.0.tgz --bundle ../test/data/sigstore-js-2.1.0-bundle.json --digest-alg sha384", + cli: fmt.Sprintf("%s --bundle %s --digest-alg sha384", artifactPath, bundlePath), wants: Options{ ArtifactPath: artifactPath, BundlePath: bundlePath, @@ -59,7 +60,7 @@ func TestNewInspectCmd(t *testing.T) { }, { name: "Use default digest-alg value", - cli: "../test/data/sigstore-js-2.1.0.tgz --bundle ../test/data/sigstore-js-2.1.0-bundle.json", + cli: fmt.Sprintf("%s --bundle %s", artifactPath, bundlePath), wants: Options{ ArtifactPath: artifactPath, BundlePath: bundlePath, @@ -70,7 +71,7 @@ func TestNewInspectCmd(t *testing.T) { }, { name: "Use custom digest-alg value", - cli: "../test/data/sigstore-js-2.1.0.tgz --bundle ../test/data/sigstore-js-2.1.0-bundle.json --digest-alg sha512", + cli: fmt.Sprintf("%s --bundle %s --digest-alg sha512", artifactPath, bundlePath), wants: Options{ ArtifactPath: artifactPath, BundlePath: bundlePath, @@ -81,7 +82,7 @@ func TestNewInspectCmd(t *testing.T) { }, { name: "Missing bundle flag", - cli: "../test/data/sigstore-js-2.1.0.tgz", + cli: artifactPath, wants: Options{ ArtifactPath: artifactPath, DigestAlgorithm: "sha256",