test: avoid running trivy tests if search build label is missing (#1172)

The 'test' makefile target runs the tests for both 'minimal' and equivalent of the former 'extended' build.
The trivy package tests were run twice, even if the trivy logic is unreachable if search is disabled.
With this update we should see a cut of about 150s of test time.

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
Andrei Aaron
2023-02-05 09:21:45 +02:00
committed by GitHub
parent 3cb99f4ed9
commit 3676c5889e
2 changed files with 6 additions and 0 deletions
@@ -1,3 +1,6 @@
//go:build search
// +build search
package cveinfo_test
import (
@@ -1,3 +1,6 @@
//go:build search
// +build search
package trivy
import (