From c4e17d6fb3a697fa9b60919ddfeea9e81f5ad9d0 Mon Sep 17 00:00:00 2001 From: Simarpreet Singh Date: Mon, 7 Oct 2019 14:26:02 -0700 Subject: [PATCH] alpine_test: Add a happy path test for walkApkBuild() Signed-off-by: Simarpreet Singh --- alpine/alpine_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/alpine/alpine_test.go b/alpine/alpine_test.go index f9a56e7..76bb8e6 100644 --- a/alpine/alpine_test.go +++ b/alpine/alpine_test.go @@ -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) +}