Skip to content

test: add test tls/mtls - #721

Merged
NguyenHoangSon96 merged 2 commits into
masterfrom
test/add-test-tls
Nov 10, 2026
Merged

NguyenHoangSon96 merged 2 commits into
masterfrom
test/add-test-tls

Conversation

@NguyenHoangSon96

@NguyenHoangSon96 NguyenHoangSon96 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #

Proposed Changes

  • Add tests to make sure that TLS/mTLS is working with our client.
  • Examples added for config TLS/mTLS

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@NguyenHoangSon96 NguyenHoangSon96 self-assigned this Oct 19, 2026
@codecov-commenter

codecov-commenter commented Oct 19, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.72%. Comparing base (5c5b3a8) to head (126befb).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #721      +/-   ##
==========================================
+ Coverage   90.55%   90.72%   +0.16%     
==========================================
  Files          41       41              
  Lines        3589     3589              
==========================================
+ Hits         3250     3256       +6     
+ Misses        339      333       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@NguyenHoangSon96 NguyenHoangSon96 changed the title [EMPTY] trigger CI test: add test tls/mtls Oct 20, 2026
@NguyenHoangSon96
NguyenHoangSon96 force-pushed the test/add-test-tls branch 2 times, most recently from fce50cd to d41d2f9 Compare October 21, 2026 06:41
@NguyenHoangSon96
NguyenHoangSon96 requested a balanced review from Copilot October 21, 2026 07:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The regeneration script targets a developer-specific absolute path instead of the current checkout.

1 open issue
What changed in this PR

Expands InfluxDB client tests for TLS and mutual TLS authentication.

Changes:

  • Adds successful and rejected certificate scenarios and SSL context precedence coverage.
  • Adds certificate fixtures and a regeneration script.
  • Improves test server cleanup and refreshes the shared server certificate.
File Description
tests/​test_InfluxDBClient.py Adds TLS/mTLS cases and server cleanup.
tests/​test_data/​certificates/​other-server.pem Untrusted certificate/key bundle.
tests/​test_data/​certificates/​other-server.key Untrusted identity's test key.
tests/​test_data/​certificates/​other-server.crt Untrusted certificate fixture.
tests/​test_data/​certificates/​influxdb.pem Server certificate/key bundle.
tests/​test_data/​certificates/​influxdb.key Server test key.
tests/​test_data/​certificates/​influxdb.crt Trusted server certificate.
tests/​test_data/​certificates/​client.pem Client certificate/key bundle.
tests/​test_data/​certificates/​client.key Client test key.
tests/​test_data/​certificates/​client.crt Trusted client certificate.
tests/​server.pem Refreshes shared server fixture.
scripts/​generate-self-signed-cert.sh Generates certificate fixtures.

Review effort: Balanced

Comment thread scripts/generate-self-signed-cert.sh Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The SSLContext precedence test does not establish its claimed behavior, and the example incorrectly promises certificate-option overrides.

2 open issues
1 resolved since last review

Review effort: Balanced

Comment thread tests/test_InfluxDBClient.py Resolved
Comment thread examples/config_tls_mtls.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@NguyenHoangSon96
NguyenHoangSon96 marked this pull request as ready for review October 21, 2026 09:36
@karel-rehor
karel-rehor force-pushed the test/add-test-tls branch 2 times, most recently from 88eb0d8 to f9d11c0 Compare November 6, 2026 16:08

@karel-rehor karel-rehor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. But...

An update to examples/README.md would be helpful.

The basic mTLS example has a minor style problem.

Comment thread examples/config_tls_mtls.py Resolved
Comment thread examples/config_tls_mtls.py Resolved
@NguyenHoangSon96

Copy link
Copy Markdown
Contributor Author

@karel-rehor
Example added to README.md.
The gittree looks terrible, but I will fix it before I merge.

@karel-rehor karel-rehor left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I was looking for a one-line mention of examples/config_tls_mtls.py in examples/README.md. But the mention in ./README.md is also useful.

@NguyenHoangSon96

Copy link
Copy Markdown
Contributor Author

I was looking for a one-line mention of examples/config_tls_mtls.py in examples/README.md. But the mention in ./README.md is also useful.

One-line mention of examples/config_tls_mtls.py in examples/README.md added.

@karel-rehor karel-rehor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tests pass locally with 3.12

Looks good to me. 🚴 🏁

@NguyenHoangSon96
NguyenHoangSon96 force-pushed the test/add-test-tls branch 2 times, most recently from c789b10 to f9fe923 Compare November 10, 2026 09:45
@NguyenHoangSon96
NguyenHoangSon96 force-pushed the test/add-test-tls branch 2 times, most recently from 126befb to 91c198b Compare November 10, 2026 10:17
@NguyenHoangSon96
NguyenHoangSon96 merged commit e14a9f2 into master Nov 10, 2026
15 checks passed
@NguyenHoangSon96
NguyenHoangSon96 deleted the test/add-test-tls branch November 10, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants