chore(mod): update fanal (#1179)

* chore(mod): update fanal

* test(integration): fix error message

* test(integration): skip reaper
This commit is contained in:
Teppei Fukuda
2021-08-15 15:19:22 +03:00
committed by GitHub
parent 2a4400c147
commit 40ed227c23
4 changed files with 302 additions and 141 deletions

18
go.mod
View File

@@ -7,8 +7,8 @@ require (
github.com/Masterminds/sprig v2.22.0+incompatible github.com/Masterminds/sprig v2.22.0+incompatible
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46
github.com/aquasecurity/bolt-fixtures v0.0.0-20200903104109-d34e7f983986 github.com/aquasecurity/bolt-fixtures v0.0.0-20200903104109-d34e7f983986
github.com/aquasecurity/fanal v0.0.0-20210808124815-d8353428bfae github.com/aquasecurity/fanal v0.0.0-20210815095355-42429a80d0e3
github.com/aquasecurity/go-dep-parser v0.0.0-20210802113332-f09967d68412 github.com/aquasecurity/go-dep-parser v0.0.0-20210815080135-5be65146849a
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce
github.com/aquasecurity/go-npm-version v0.0.0-20201110091526-0b796d180798 github.com/aquasecurity/go-npm-version v0.0.0-20201110091526-0b796d180798
github.com/aquasecurity/go-pep440-version v0.0.0-20210121094942-22b2f8951d46 github.com/aquasecurity/go-pep440-version v0.0.0-20210121094942-22b2f8951d46
@@ -17,15 +17,14 @@ require (
github.com/caarlos0/env/v6 v6.0.0 github.com/caarlos0/env/v6 v6.0.0
github.com/cenkalti/backoff v2.2.1+incompatible github.com/cenkalti/backoff v2.2.1+incompatible
github.com/cheggaaa/pb/v3 v3.0.3 github.com/cheggaaa/pb/v3 v3.0.3
github.com/containerd/containerd v1.4.4 // indirect github.com/docker/docker v20.10.8+incompatible
github.com/docker/docker v20.10.3+incompatible
github.com/docker/go-connections v0.4.0 github.com/docker/go-connections v0.4.0
github.com/elazarl/goproxy v0.0.0-20200809112317-0581fc3aee2d // indirect github.com/elazarl/goproxy v0.0.0-20200809112317-0581fc3aee2d // indirect
github.com/fatih/color v1.10.0 github.com/fatih/color v1.10.0
github.com/go-redis/redis/v8 v8.4.0 github.com/go-redis/redis/v8 v8.11.3
github.com/goccy/go-yaml v1.8.2 // indirect github.com/goccy/go-yaml v1.8.2 // indirect
github.com/golang/protobuf v1.5.2 github.com/golang/protobuf v1.5.2
github.com/google/go-containerregistry v0.1.2 github.com/google/go-containerregistry v0.6.0
github.com/google/go-github/v33 v33.0.0 github.com/google/go-github/v33 v33.0.0
github.com/google/wire v0.4.0 github.com/google/wire v0.4.0
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect
@@ -38,17 +37,16 @@ require (
github.com/masahiro331/go-mvn-version v0.0.0-20210429150710-d3157d602a08 github.com/masahiro331/go-mvn-version v0.0.0-20210429150710-d3157d602a08
github.com/mitchellh/copystructure v1.1.1 // indirect github.com/mitchellh/copystructure v1.1.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 github.com/olekukonko/tablewriter v0.0.5
github.com/open-policy-agent/opa v0.25.2 github.com/open-policy-agent/opa v0.31.0
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/smartystreets/assertions v1.2.0 // indirect github.com/smartystreets/assertions v1.2.0 // indirect
github.com/spf13/afero v1.6.0 github.com/spf13/afero v1.6.0
github.com/stretchr/objx v0.3.0 // indirect github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.7.0 github.com/stretchr/testify v1.7.0
github.com/testcontainers/testcontainers-go v0.9.1-0.20210218153226-c8e070a2f18d github.com/testcontainers/testcontainers-go v0.11.1
github.com/twitchtv/twirp v8.1.0+incompatible github.com/twitchtv/twirp v8.1.0+incompatible
github.com/urfave/cli/v2 v2.3.0 github.com/urfave/cli/v2 v2.3.0
go.uber.org/zap v1.17.0 go.uber.org/zap v1.17.0
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
google.golang.org/protobuf v1.26.0 google.golang.org/protobuf v1.26.0
gopkg.in/go-playground/validator.v9 v9.31.0 // indirect gopkg.in/go-playground/validator.v9 v9.31.0 // indirect

415
go.sum

File diff suppressed because it is too large Load Diff

View File

@@ -591,6 +591,8 @@ func setupRedis(t *testing.T, ctx context.Context) (testcontainers.Container, st
Name: "redis", Name: "redis",
Image: imageName, Image: imageName,
ExposedPorts: []string{port}, ExposedPorts: []string{port},
SkipReaper: true,
AutoRemove: true,
} }
redis, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ redis, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{

View File

@@ -56,6 +56,8 @@ func setupRegistry(ctx context.Context, baseDir string, authURL *url.URL) (testc
BindMounts: map[string]string{ BindMounts: map[string]string{
filepath.Join(baseDir, "data", "certs"): "/certs", filepath.Join(baseDir, "data", "certs"): "/certs",
}, },
SkipReaper: true,
AutoRemove: true,
WaitingFor: wait.ForLog("listening on [::]:5443"), WaitingFor: wait.ForLog("listening on [::]:5443"),
} }
@@ -75,6 +77,8 @@ func setupAuthServer(ctx context.Context, baseDir string) (testcontainers.Contai
filepath.Join(baseDir, "data", "auth_config"): "/config", filepath.Join(baseDir, "data", "auth_config"): "/config",
filepath.Join(baseDir, "data", "certs"): "/certs", filepath.Join(baseDir, "data", "certs"): "/certs",
}, },
SkipReaper: true,
AutoRemove: true,
Cmd: []string{"/config/config.yml"}, Cmd: []string{"/config/config.yml"},
} }
@@ -170,7 +174,7 @@ func TestRegistry(t *testing.T) {
name: "sad path", name: "sad path",
imageName: "alpine:3.10", imageName: "alpine:3.10",
imageFile: "testdata/fixtures/images/alpine-310.tar.gz", imageFile: "testdata/fixtures/images/alpine-310.tar.gz",
wantErr: "unsupported status code 401; body: Auth failed", wantErr: "unexpected status code 401 Unauthorized: Auth failed",
}, },
} }