mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-21 23:00:42 -08:00
refactor: use testing DB instead of mock (#1234)
This commit is contained in:
@@ -40,7 +40,7 @@ func TestConvertToRpcPkgs(t *testing.T) {
|
||||
SrcVersion: "1.2.3",
|
||||
SrcRelease: "1",
|
||||
SrcEpoch: 2,
|
||||
License: "MIT",
|
||||
License: "MIT",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -55,7 +55,7 @@ func TestConvertToRpcPkgs(t *testing.T) {
|
||||
SrcVersion: "1.2.3",
|
||||
SrcRelease: "1",
|
||||
SrcEpoch: 2,
|
||||
License: "MIT",
|
||||
License: "MIT",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -90,7 +90,7 @@ func TestConvertFromRpcPkgs(t *testing.T) {
|
||||
SrcVersion: "1.2.3",
|
||||
SrcRelease: "1",
|
||||
SrcEpoch: 2,
|
||||
License: "MIT",
|
||||
License: "MIT",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -105,7 +105,7 @@ func TestConvertFromRpcPkgs(t *testing.T) {
|
||||
SrcVersion: "1.2.3",
|
||||
SrcRelease: "1",
|
||||
SrcEpoch: 2,
|
||||
License: "MIT",
|
||||
License: "MIT",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -329,7 +329,7 @@ func TestConvertFromRPCResults(t *testing.T) {
|
||||
Title: "DoS",
|
||||
Description: "Denial of Service",
|
||||
Severity: common.Severity_MEDIUM,
|
||||
SeveritySource: vulnerability.Nvd,
|
||||
SeveritySource: vulnerability.NVD,
|
||||
CweIds: []string{"CWE-123", "CWE-456"},
|
||||
Cvss: map[string]*common.CVSS{
|
||||
"redhat": {
|
||||
@@ -365,7 +365,7 @@ func TestConvertFromRPCResults(t *testing.T) {
|
||||
Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812",
|
||||
DiffID: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079",
|
||||
},
|
||||
SeveritySource: vulnerability.Nvd,
|
||||
SeveritySource: vulnerability.NVD,
|
||||
PrimaryURL: "https://avd.aquasec.com/nvd/CVE-2019-0001",
|
||||
Vulnerability: dbTypes.Vulnerability{
|
||||
Title: "DoS",
|
||||
@@ -405,7 +405,7 @@ func TestConvertFromRPCResults(t *testing.T) {
|
||||
Title: "DoS",
|
||||
Description: "Denial of Service",
|
||||
Severity: common.Severity_MEDIUM,
|
||||
SeveritySource: vulnerability.Nvd,
|
||||
SeveritySource: vulnerability.NVD,
|
||||
CweIds: []string{"CWE-123", "CWE-456"},
|
||||
Cvss: map[string]*common.CVSS{
|
||||
"redhat": {
|
||||
@@ -441,7 +441,7 @@ func TestConvertFromRPCResults(t *testing.T) {
|
||||
Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812",
|
||||
DiffID: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079",
|
||||
},
|
||||
SeveritySource: vulnerability.Nvd,
|
||||
SeveritySource: vulnerability.NVD,
|
||||
PrimaryURL: "https://avd.aquasec.com/nvd/CVE-2019-0001",
|
||||
Vulnerability: dbTypes.Vulnerability{
|
||||
Title: "DoS",
|
||||
|
||||
Reference in New Issue
Block a user