diff --git a/pkg/process/processors/github_processor_test.go b/pkg/process/processors/github_processor_test.go index 39f8fd93..978d5844 100644 --- a/pkg/process/processors/github_processor_test.go +++ b/pkg/process/processors/github_processor_test.go @@ -9,6 +9,7 @@ import ( "github.com/anchore/grype-db/pkg/data" "github.com/anchore/grype-db/pkg/process/internal/tests" + "github.com/anchore/grype-db/pkg/provider" "github.com/anchore/grype-db/pkg/provider/unmarshal" ) @@ -27,7 +28,9 @@ func TestGitHubProcessor_Process(t *testing.T) { defer tests.CloseFile(f) processor := NewGitHubProcessor(mockGithubProcessorTransform) - entries, err := processor.Process(f) + entries, err := processor.Process(f, provider.State{ + Provider: "github", + }) assert.NoError(t, err) assert.Len(t, entries, 3) diff --git a/pkg/process/processors/match_exclusion_processor_test.go b/pkg/process/processors/match_exclusion_processor_test.go index 39cb7821..f658cbd9 100644 --- a/pkg/process/processors/match_exclusion_processor_test.go +++ b/pkg/process/processors/match_exclusion_processor_test.go @@ -9,6 +9,7 @@ import ( "github.com/anchore/grype-db/pkg/data" "github.com/anchore/grype-db/pkg/process/internal/tests" + "github.com/anchore/grype-db/pkg/provider" "github.com/anchore/grype-db/pkg/provider/unmarshal" ) @@ -27,7 +28,9 @@ func TestMatchExclusionProcessor_Process(t *testing.T) { defer tests.CloseFile(f) processor := NewMatchExclusionProcessor(mockMatchExclusionProcessorTransform) - entries, err := processor.Process(f) + entries, err := processor.Process(f, provider.State{ + Provider: "match-exclusions", + }) require.NoError(t, err) assert.Len(t, entries, 3) diff --git a/pkg/process/processors/msrc_processor_test.go b/pkg/process/processors/msrc_processor_test.go index 5df4c1a5..372b1cdd 100644 --- a/pkg/process/processors/msrc_processor_test.go +++ b/pkg/process/processors/msrc_processor_test.go @@ -9,6 +9,7 @@ import ( "github.com/anchore/grype-db/pkg/data" "github.com/anchore/grype-db/pkg/process/internal/tests" + "github.com/anchore/grype-db/pkg/provider" "github.com/anchore/grype-db/pkg/provider/unmarshal" ) @@ -27,7 +28,9 @@ func TestMSRCProcessor_Process(t *testing.T) { defer tests.CloseFile(f) processor := NewMSRCProcessor(mockMSRCProcessorTransform) - entries, err := processor.Process(f) + entries, err := processor.Process(f, provider.State{ + Provider: "msrc", + }) require.NoError(t, err) assert.Len(t, entries, 2) diff --git a/pkg/process/processors/nvd_processor_test.go b/pkg/process/processors/nvd_processor_test.go index 76e8a81e..4009ef55 100644 --- a/pkg/process/processors/nvd_processor_test.go +++ b/pkg/process/processors/nvd_processor_test.go @@ -9,6 +9,7 @@ import ( "github.com/anchore/grype-db/pkg/data" "github.com/anchore/grype-db/pkg/process/internal/tests" + "github.com/anchore/grype-db/pkg/provider" "github.com/anchore/grype-db/pkg/provider/unmarshal" ) @@ -27,7 +28,9 @@ func TestNVDProcessor_Process(t *testing.T) { defer tests.CloseFile(f) processor := NewNVDProcessor(mockNVDProcessorTransform) - entries, err := processor.Process(f) + entries, err := processor.Process(f, provider.State{ + Provider: "nvd", + }) require.NoError(t, err) assert.Len(t, entries, 3) diff --git a/pkg/process/processors/os_processor_test.go b/pkg/process/processors/os_processor_test.go index 9f3234c2..0970faa2 100644 --- a/pkg/process/processors/os_processor_test.go +++ b/pkg/process/processors/os_processor_test.go @@ -9,6 +9,7 @@ import ( "github.com/anchore/grype-db/pkg/data" "github.com/anchore/grype-db/pkg/process/internal/tests" + "github.com/anchore/grype-db/pkg/provider" "github.com/anchore/grype-db/pkg/provider/unmarshal" ) @@ -27,7 +28,9 @@ func TestOSProcessor_Process(t *testing.T) { defer tests.CloseFile(f) processor := NewOSProcessor(mockOSProcessorTransform) - entries, err := processor.Process(f) + entries, err := processor.Process(f, provider.State{ + Provider: "rhel", + }) require.NoError(t, err) assert.Len(t, entries, 4) diff --git a/pkg/process/v6/transformers/os/transform_test.go b/pkg/process/v6/transformers/os/transform_test.go index 1d6400f0..25cfbb4d 100644 --- a/pkg/process/v6/transformers/os/transform_test.go +++ b/pkg/process/v6/transformers/os/transform_test.go @@ -532,10 +532,9 @@ func TestTransform(t *testing.T) { VulnerabilityHandle: grypeDB.VulnerabilityHandle{ Name: "CVE-2011-4623", BlobValue: &grypeDB.VulnerabilityBlob{ - ID: "CVE-2011-4623", - ProviderName: "debian", - Status: "active", - PublishedDate: &timeVal, + ID: "CVE-2011-4623", + ProviderName: "debian", + Status: "active", References: []grypeDB.Reference{ { URL: "https://security-tracker.debian.org/tracker/CVE-2011-4623",