From 8d9f1a8c43bc6c2eb3f2564308de52a9d1a197c0 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Fri, 22 Dec 2023 14:34:37 -0500 Subject: [PATCH] skip tests that are missing full binaries Signed-off-by: Alex Goodman --- .../test-fixtures/manager/testutil/snippet_or_binary.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/syft/pkg/cataloger/binary/test-fixtures/manager/testutil/snippet_or_binary.go b/syft/pkg/cataloger/binary/test-fixtures/manager/testutil/snippet_or_binary.go index aa194b3a1..609169182 100644 --- a/syft/pkg/cataloger/binary/test-fixtures/manager/testutil/snippet_or_binary.go +++ b/syft/pkg/cataloger/binary/test-fixtures/manager/testutil/snippet_or_binary.go @@ -63,6 +63,10 @@ func SnippetOrBinary(t *testing.T, path string, requireBinary bool) string { break } + if v.SnippetPath != "" && !v.IsConfigured { + t.Skip("no binary found, but is covered by a snippet. Please add this case to the 'binary/test-fixtures/config.yaml' and recreate the snippet") + } + t.Fatalf("no binary found for %q", path) } }