From 180c951697727ad837e600e057637399c55b6b0f Mon Sep 17 00:00:00 2001 From: "Adolfo Garcia Veytia (puerco)" Date: Tue, 28 Nov 2023 21:56:13 -0800 Subject: [PATCH] Switch unit+integration tests from RepoDigests to UserInput As we now delegate the generation of identifiers to the openvex libraries, we pass the user input string verbatim instead of using the stereoscope reference in the tests. Signed-off-by: Adolfo Garcia Veytia (puerco) --- grype/vex/processor_test.go | 4 +--- test/integration/match_by_image_test.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/grype/vex/processor_test.go b/grype/vex/processor_test.go index 85168f2b1ab..c9febf2f762 100644 --- a/grype/vex/processor_test.go +++ b/grype/vex/processor_test.go @@ -19,9 +19,7 @@ func TestProcessor_ApplyVEX(t *testing.T) { Name: "alpine", Version: "3.17", Metadata: source.StereoscopeImageSourceMetadata{ - RepoDigests: []string{ - "alpine@sha256:124c7d2707904eea7431fffe91522a01e5a861a624ee31d03372cc1d138a3126", - }, + UserInput: "alpine@sha256:124c7d2707904eea7431fffe91522a01e5a861a624ee31d03372cc1d138a3126", }, }, Distro: nil, diff --git a/test/integration/match_by_image_test.go b/test/integration/match_by_image_test.go index a949e52976c..8e4df3adbcb 100644 --- a/test/integration/match_by_image_test.go +++ b/test/integration/match_by_image_test.go @@ -836,9 +836,7 @@ func vexMatches(t *testing.T, ignoredMatches []match.IgnoredMatch, vexStatus vex pctx := &pkg.Context{ Source: &source.Description{ Metadata: source.StereoscopeImageSourceMetadata{ - RepoDigests: []string{ - "alpine@sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - }, + UserInput: "alpine@sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", }, }, Distro: &linux.Release{},