Skip to content

ROX-9214: Move central/testutils/mtls to pkg/testutils/central#583

Merged
juanrh merged 2 commits intomasterfrom
juanrh/ROX-9214
Feb 8, 2022
Merged

ROX-9214: Move central/testutils/mtls to pkg/testutils/central#583
juanrh merged 2 commits intomasterfrom
juanrh/ROX-9214

Conversation

@juanrh
Copy link
Contributor

@juanrh juanrh commented Feb 7, 2022

so we can easily generate TLS certificates for sensor tests

Description

This moves the package central/testutils/mtls to pkg/testutils/central so it can be used to easily generate TLS certificates for sensor tests, which would be useful in #471

Checklist

  • Investigated and inspected CI test results
  • [ ] Unit test and regression tests added
  • Evaluated and added CHANGELOG entry if required
  • Determined and documented upgrade steps

No CHANGELOG entry or upgrade steps required.

Testing Performed

This doesn't change any behaviour, it just moves some central test utils to pkg. Affected unit tests will be re-run by CI.

go test -count=1 -race -v -p=1 github.com/stackrox/rox/central/clusters &&\
go test -count=1 -race -v -p=1 github.com/stackrox/rox/central/localscanner &&\
go test -count=1 -race -v -p=1 github.com/stackrox/rox/central/metadata/service &&\
go test -count=1 -race -v -p=1 github.com/stackrox/rox/central/scanner &&\
go test -count=1 -race -v -p=1 github.com/stackrox/rox/central/sensor/service/connection

so we can easily generate TLS certificates for sensor tests
@ghost
Copy link

ghost commented Feb 7, 2022

Tag for build #188068 is 3.68.x-147-g4de3ec9598.

💻 For deploying this image using the dev scripts, run the following first:

export MAIN_IMAGE_TAG='3.68.x-147-g4de3ec9598'

📦 You can also generate an installation bundle with:

docker run -i --rm stackrox/main:3.68.x-147-g4de3ec9598 central generate interactive > bundle.zip

🕹️ A roxctl binary artifact can be downloaded from CircleCI.

Copy link
Contributor

@porridge porridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we want the central/ component in the new path. If this is going to be used by sensor tests, then it's no longer central-specific, right? Perhaps pkg/testutils/mtls then, or even pkg/mtls/testutils?

@SimonBaeumer
Copy link
Contributor

SimonBaeumer commented Feb 8, 2022

I'm not sure we want the central/ component in the new path. If this is going to be used by sensor tests, then it's no longer central-specific, right? Perhaps pkg/testutils/mtls then, or even pkg/mtls/testutils?

+1 for for pkg/mtls/testutils. testutils to a specific package (like mtls) typically reside inside of that package. pkg/testutils is very generic, i.e. the envisolator is there.
For example pkg/buildinfo, pkg/version or pkg/grpc also contain testutils.

@juanrh juanrh requested a review from porridge February 8, 2022 10:36
@juanrh juanrh merged commit 8d2e9a8 into master Feb 8, 2022
@juanrh juanrh deleted the juanrh/ROX-9214 branch February 8, 2022 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants