alpine_test: Add a happy path test for walkApkBuild()

Signed-off-by: Simarpreet Singh <simar@linux.com>
This commit is contained in:
Simarpreet Singh 2019-10-07 14:26:02 -07:00
parent 50cdf7e03e
commit c4e17d6fb3
No known key found for this signature in database
GPG Key ID: 029C2FCCD346A8AC

View File

@ -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)
}