Skip to content

Commit

Permalink
ROX-19901: Removes BoltDB & mock gRPC server from tests, in favor of …
Browse files Browse the repository at this point in the history
…in-tree gRPC server (#1313)

Collector events are streamed directly to the tests now, and
there are several helper APIs for getting and testing
against the events.

This includes several adjustments to the tests themselves
to conform to the new mechanisms, and iron out a few
timing issues that cropped up as a result.

---------

Co-authored-by: Mauro Ezequiel Moltrasio <[email protected]>
  • Loading branch information
Stringy and Molter73 authored Oct 2, 2023
1 parent 3ba54be commit b9ab8e0
Show file tree
Hide file tree
Showing 36 changed files with 1,590 additions and 1,063 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests-vm-type.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: '1.13' # to match the requirement in the integration tests
go-version: '1.19' # to match the requirement in the integration tests
- uses: actions/setup-python@v3
with:
python-version: "3.10"
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ baseline: TestBenchmarkBaseline
LOG_FILE ?= integration-test.log
.PHONY: report
report:
go get -u github.com/jstemmer/go-junit-report
go install github.com/jstemmer/go-junit-report/v2@latest
@echo "+ $@"
@cat $(LOG_FILE) | go-junit-report > `dirname $(LOG_FILE)`/integration-test-report.xml
@echo
Expand Down
56 changes: 47 additions & 9 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,22 +1,60 @@
module github.com/stackrox/collector/integration-tests

go 1.13
go 1.19

require (
github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/hashicorp/go-multierror v1.1.1
github.com/pkg/errors v0.9.1
github.com/stackrox/rox v0.0.0-20210914215712-9ac265932e28
github.com/stretchr/testify v1.8.4
github.com/thoas/go-funk v0.9.3
google.golang.org/grpc v1.58.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/boltdb/bolt v1.3.1
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac // indirect
github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82 // indirect
github.com/gonum/integrate v0.0.0-20181209220457-a422b5c0fdf2 // indirect
github.com/gonum/internal v0.0.0-20181124074243-f884aa714029 // indirect
github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9 // indirect
github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9 // indirect
github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/hashicorp/go-multierror v1.1.1
github.com/pkg/errors v0.8.1
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.6 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.2.2
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e // indirect
gopkg.in/yaml.v3 v3.0.1
github.com/stackrox/scanner v0.0.0-20230411230651-f2265de65ce4 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect
google.golang.org/protobuf v1.31.0 // indirect
k8s.io/apimachinery v0.27.4 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect
)

replace (
github.com/blevesearch/bleve => github.com/stackrox/bleve v0.0.0-20220907150529-4ecbd2543f9e
github.com/facebookincubator/nvdtools => github.com/stackrox/nvdtools v0.0.0-20230214202552-24e684e3ad9d
github.com/fullsailor/pkcs7 => github.com/stackrox/pkcs7 v0.0.0-20220914154527-cfdb0aa47179
github.com/gogo/protobuf => github.com/connorgorman/protobuf v1.2.2-0.20210115205927-b892c1b298f7
github.com/heroku/docker-registry-client => github.com/stackrox/docker-registry-client v0.0.0-20230714151239-78b1f5f70b8a
github.com/operator-framework/helm-operator-plugins => github.com/stackrox/helm-operator v0.0.10-0.20220919093109-89f9785764c6
github.com/stackrox/rox => github.com/stackrox/stackrox v0.0.0-20230918143419-23e948778ebe
go.uber.org/zap => github.com/stackrox/zap v1.15.1-0.20200720133746-810fd602fd0f
)
174 changes: 165 additions & 9 deletions integration-tests/go.sum

Large diffs are not rendered by default.

Loading

0 comments on commit b9ab8e0

Please sign in to comment.