From 8075eadc1a7a3523be30bfef4ab06043f4051f90 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 2 Oct 2020 16:47:54 -0700 Subject: [PATCH] test: add wait for trivy db download in test case --- pkg/extensions/search/cve/cve_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/extensions/search/cve/cve_test.go b/pkg/extensions/search/cve/cve_test.go index a8c3d372..d88390c4 100644 --- a/pkg/extensions/search/cve/cve_test.go +++ b/pkg/extensions/search/cve/cve_test.go @@ -500,6 +500,9 @@ func TestCVESearch(t *testing.T) { time.Sleep(100 * time.Millisecond) } + // Wait for trivy db to download + time.Sleep(30 * time.Second) + defer func() { ctx := context.Background() _ = c.Server.Shutdown(ctx)