Skip to content

Remove unused TLS material loader and update tests (issue #345) - #346

Merged
kimhanbeom merged 1 commit into
mainfrom
octoaide/issue-345-2026-06-15T18-29-20
Jun 16, 2026
Merged

Remove unused TLS material loader and update tests (issue #345)#346
kimhanbeom merged 1 commit into
mainfrom
octoaide/issue-345-2026-06-15T18-29-20

Conversation

@octoaide

@octoaide octoaide Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Closes #345

Summary

This PR removes an unused thin wrapper function, load_tls_material,
from src/main.rs that triggered a dead-code warning on the default
cargo check path. Tests and documentation that previously referenced
that wrapper were updated to use load_tls_material_with_bytes
directly and discard the raw TLS bytes where only parsed Certs are
required.

What changed

  • Removed load_tls_material from src/main.rs.
  • Updated rustdoc for load_tls_material_with_bytes to remove references
    to the removed wrapper.
  • Updated tests (including the SIGHUP acceptance test in
    src/subscribe/tests.rs) to call load_tls_material_with_bytes and
    ignore the raw bytes when appropriate.
  • Preserved existing validation behaviour: cert/key/CA material is still
    parsed and validated before being published to reload paths.

Files touched (high level)

  • src/main.rs
  • src/subscribe/tests.rs

Validation performed

  • cargo fmt --all --check (passes)
  • cargo check (no dead-code warnings)
  • cargo check --tests (passes)
  • cargo test load_tls_material (relevant tests pass)
  • cargo test tls_reload (relevant tests pass)
  • cargo test sighup_rerun_rebuilds_shared_endpoint_for_ingest_and_publish
    (passes)
  • cargo clippy --tests --all-features (no warnings)

Notes

This is an internal cleanup with no user-visible behaviour changes.
When reviewing, please note PR #303 (cooperative shutdown work) so the
maintainer can ensure no overlap with concurrent changes.

Issue: #345

This commit is for issue #345: Remove the unused TLS material loader
wrapper and update tests
@octoaide
octoaide Bot requested review from danbi2990, kimhanbeom and sehkone June 15, 2026 18:31
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.10%. Comparing base (1f8a0c0) to head (3f182c4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #346      +/-   ##
==========================================
- Coverage   89.11%   89.10%   -0.01%     
==========================================
  Files           7        7              
  Lines        3270     3269       -1     
==========================================
- Hits         2914     2913       -1     
  Misses        356      356              

☔ 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.

@danbi2990 danbi2990 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 to me. I verified that the unused wrapper is removed, tests now call load_tls_material_with_bytes directly, and the TLS material validation behavior is preserved.

@kimhanbeom
kimhanbeom merged commit 675e696 into main Jun 16, 2026
13 checks passed
@kimhanbeom
kimhanbeom deleted the octoaide/issue-345-2026-06-15T18-29-20 branch June 16, 2026 02:21
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.

Remove the unused TLS material loader wrapper and update tests

2 participants