alpine_test: Add a happy path test for walkApkBuild()
Signed-off-by: Simarpreet Singh <simar@linux.com>
This commit is contained in:
parent
50cdf7e03e
commit
c4e17d6fb3
@ -189,3 +189,11 @@ func TestShouldOverwrite(t *testing.T) {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
func TestWalkApkBuild(t *testing.T) {
|
||||
advisories, err := walkApkBuild("testdata", "1.0.0")
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, []Advisory{
|
||||
{IssueID: 0, VulnerabilityID: "CVE-2019-7572", Release: "1.0.0", Package: "testdata", Repository: ".", FixedVersion: "1.2.15-r11", Subject: "", Description: ""},
|
||||
{IssueID: 0, VulnerabilityID: "CVE-2019-7574", Release: "1.0.0", Package: "testdata", Repository: ".", FixedVersion: "1.2.15-r11", Subject: "", Description: ""}}, advisories)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user