Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cleanup] Consolidate certs used in tests #20336

Merged

Conversation

michaeljmarshall
Copy link
Member

@michaeljmarshall michaeljmarshall commented May 16, 2023

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
Member Author

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

codecov-commenter commented May 17, 2023

Codecov Report

Merging #20336 (05342e9) into master (426ad3e) will increase coverage by 0.01%.
The diff coverage is n/a.

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.

Impacted Files Coverage Δ
...ache/pulsar/broker/loadbalance/LinuxInfoUtils.java 43.65% <ø> (ø)
...ker/loadbalance/impl/LinuxBrokerHostUsageImpl.java 79.68% <ø> (-4.69%) ⬇️

... and 71 files with indirect coverage changes

@michaeljmarshall michaeljmarshall merged commit d45a220 into apache:master May 17, 2023
43 checks passed
@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.

None yet

3 participants