From 9ec3ad58c81ea5a1d0c3cbe7614ddde06f5ea7ab Mon Sep 17 00:00:00 2001 From: Dan Luhring Date: Tue, 19 Jan 2021 22:20:12 -0500 Subject: [PATCH] Update regression test expected value and pin deps Signed-off-by: Dan Luhring --- syft/cataloger/javascript/parse_package_json.go | 3 ++- test/integration/regression_test.go | 2 +- .../test-fixtures/image-large-apk-data/Dockerfile | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/syft/cataloger/javascript/parse_package_json.go b/syft/cataloger/javascript/parse_package_json.go index 0bccb100c..cccd0b51f 100644 --- a/syft/cataloger/javascript/parse_package_json.go +++ b/syft/cataloger/javascript/parse_package_json.go @@ -4,10 +4,11 @@ import ( "encoding/json" "errors" "fmt" - "github.com/anchore/syft/internal/log" "io" "regexp" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/internal" "github.com/mitchellh/mapstructure" diff --git a/test/integration/regression_test.go b/test/integration/regression_test.go index 1d5340d1f..34f8f2ff8 100644 --- a/test/integration/regression_test.go +++ b/test/integration/regression_test.go @@ -24,7 +24,7 @@ func TestRegression212ApkBufferSize(t *testing.T) { t.Fatalf("failed to catalog image: %+v", err) } - expectedPkgs := 57 + expectedPkgs := 58 actualPkgs := 0 for range catalog.Enumerate(pkg.ApkPkg) { actualPkgs += 1 diff --git a/test/integration/test-fixtures/image-large-apk-data/Dockerfile b/test/integration/test-fixtures/image-large-apk-data/Dockerfile index 465f33bcf..357f0a5d9 100644 --- a/test/integration/test-fixtures/image-large-apk-data/Dockerfile +++ b/test/integration/test-fixtures/image-large-apk-data/Dockerfile @@ -1,2 +1,5 @@ -FROM alpine:latest -RUN apk add tzdata vim alpine-sdk +FROM alpine@sha256:d9a7354e3845ea8466bb00b22224d9116b183e594527fb5b6c3d30bc01a20378 +RUN apk add --no-cache \ + tzdata=2020f-r0 \ + vim=8.2.2320-r0 \ + alpine-sdk=1.0-r0