🌱 OPRUN-4574: test: add TLS profile unit and e2e tests#2653
🌱 OPRUN-4574: test: add TLS profile unit and e2e tests#2653tmshort wants to merge 1 commit intooperator-framework:mainfrom
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Adds explicit test coverage (unit + e2e) for custom TLS profile flags (--tls-custom-*) to validate version, cipher, and curve enforcement.
Changes:
- Added
tlsprofilesunit tests that stand up a local TLS server and validate negotiation/enforcement behaviors. - Added new e2e Godog steps + a
tls.featurefile that patches thecatalogddeployment TLS args and asserts expected connection outcomes. - Extended the
make test-e2etarget to acceptGODOG_ARGSfor running a subset of features/scenarios.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/steps/tls_steps.go | Implements e2e step helpers for patching deployments and asserting TLS negotiation/rejection against metrics endpoints. |
| test/e2e/steps/steps.go | Registers new TLS-related Godog steps. |
| test/e2e/steps/hooks.go | Adds scenario cleanup support to restore modified deployment args after each scenario. |
| test/e2e/features/tls.feature | New e2e feature scenarios covering TLS min-version, cipher enforcement, and curve enforcement. |
| internal/shared/util/tlsprofiles/tlsprofiles_connection_test.go | New unit tests validating custom TLS profile behavior via real TLS handshakes. |
| Makefile | Adds GODOG_ARGS passthrough to the e2e test runner. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1459482 to
6fd8bd1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2653 +/- ##
=======================================
Coverage 68.89% 68.89%
=======================================
Files 141 141
Lines 10009 10009
=======================================
Hits 6896 6896
Misses 2596 2596
Partials 517 517
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6fd8bd1 to
daed167
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
daed167 to
3b5ceb3
Compare
3b5ceb3 to
c780b52
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Unit tests in tlsprofiles package verify cipher negotiation, cipher rejection, min-version enforcement, and curve acceptance/rejection by starting a local TLS server with a custom profile and connecting to it with a restricted client config. - e2e feature (tls.feature) patches the catalogd deployment with specific custom TLS settings for each scenario, asserts the expected connection behaviour, then restores the original args on cleanup. Covers min-version enforcement (TLSv1.3), cipher negotiation and rejection (TLS 1.2 + ECDHE_ECDSA), and curve enforcement (prime256v1 accepted, secp521r1 rejected). - GODOG_ARGS variable added to the e2e Makefile target so a single feature file can be run with: make test-e2e GODOG_ARGS=features/tls.feature Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Todd Short <tshort@redhat.com>
c780b52 to
d92c0f6
Compare
Explicitly tests the
--tls-customarguments, so that we can be sure that they work as expected.Description
Reviewer Checklist