Skip to content

[cleanup] Consolidate certs used in tests#20336

Merged
michaeljmarshall merged 1 commit into
apache:masterfrom
michaeljmarshall:consolidate-certs-tests
May 17, 2023
Merged

[cleanup] Consolidate certs used in tests#20336
michaeljmarshall merged 1 commit into
apache:masterfrom
michaeljmarshall:consolidate-certs-tests

Conversation

@michaeljmarshall

@michaeljmarshall michaeljmarshall commented May 16, 2023

Copy link
Copy Markdown
Member

Builds on: #20289

Motivation

There are many certificates in our test code base. It would be much simpler to have one place were we create and manage certificates so that when we need to make changes, they are consolidated.

There is likely one or two more PRs to finish consolidating certs.

Modifications

  • Remove certs that are no longer used
  • Replace references to old certs with references to the certificate-authority certs
  • Create new server certs with valid hostnames on them so that tests will pass. Document the process used to create these certs.
  • Fix an issue in the PulsarTestContext where the configuration was not correctly updated.
  • Remove configurations that allow for insecure connections in tests that are doing some kind of TLS verification. The only places where we leave insecure validation in place is tests that are specifically verifying the functionality.
  • Copy certificate-authority to the relevant bouncy-castle directory

Verifying this change

When tests pass, this change will be correctly verified.

Documentation

  • doc
    This PR includes doc changes

Matching PR in forked repository

PR in forked repository: michaeljmarshall#48

@michaeljmarshall michaeljmarshall added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. area/test labels May 16, 2023
@michaeljmarshall michaeljmarshall added this to the 3.1.0 milestone May 16, 2023
@michaeljmarshall michaeljmarshall self-assigned this May 16, 2023
@michaeljmarshall

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

@michaeljmarshall michaeljmarshall force-pushed the consolidate-certs-tests branch from 1bab09a to 05342e9 Compare May 17, 2023 02:07
@codecov-commenter

codecov-commenter commented May 17, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.95%. Comparing base (426ad3e) to head (05342e9).
Report is 1956 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #20336      +/-   ##
============================================
+ Coverage     72.93%   72.95%   +0.01%     
+ Complexity    31973    31972       -1     
============================================
  Files          1868     1868              
  Lines        138663   138663              
  Branches      15248    15248              
============================================
+ Hits         101133   101156      +23     
+ Misses        29484    29457      -27     
- Partials       8046     8050       +4     
Flag Coverage Δ
inttests 24.08% <ø> (-0.04%) ⬇️
systests 24.93% <ø> (+0.06%) ⬆️
unittests 72.22% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 72 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@michaeljmarshall michaeljmarshall merged commit d45a220 into apache:master May 17, 2023
@michaeljmarshall michaeljmarshall deleted the consolidate-certs-tests branch May 17, 2023 15:29
lhotari pushed a commit that referenced this pull request Jan 26, 2024
Builds on: #20289

There are many certificates in our test code base. It would be much simpler to have one place were we create and manage certificates so that when we need to make changes, they are consolidated.

There is likely one or two more PRs to finish consolidating certs.

* Remove certs that are no longer used
* Replace references to old certs with references to the `certificate-authority` certs
* Create new server certs with valid hostnames on them so that tests will pass. Document the process used to create these certs.
* Fix an issue in the `PulsarTestContext` where the configuration was not correctly updated.
* Remove configurations that allow for insecure connections in tests that are doing some kind of TLS verification. The only places where we leave insecure validation in place is tests that are specifically verifying the functionality.
* Copy `certificate-authority` to the relevant `bouncy-castle` directory

When tests pass, this change will be correctly verified.

- [x] `doc`
This PR includes doc changes

PR in forked repository: michaeljmarshall#48

(cherry picked from commit d45a220)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test cherry-picked/branch-3.0 cherry-picked/branch-3.1 doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. ready-to-test release/3.0.3 release/3.1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants