Skip to content

Fix hermetic connector tests - #1124

Open
byte-kort wants to merge 9 commits into
cloudflare:mainfrom
byte-kort:fix-hermetic-connector-tests
Open

byte-kort wants to merge 9 commits into
cloudflare:mainfrom
byte-kort:fix-hermetic-connector-tests

Conversation

@byte-kort

Copy link
Copy Markdown

Summary

This PR makes the pingora-core connector tests hermetic by removing their dependencies on the external 1.1.1.1 endpoint.

The affected tests have been updated to use local mock TCP/TLS servers instead of relying on real network connections and Cloudflare's live services.

Changes

  • Replaced external 1.1.1.1 connections with local mock TCP/TLS servers.
  • Updated the affected tests across the connector modules specified in the issue.
  • Added local TLS test certificates and keys where needed.
  • Ensured the affected tests no longer depend on external network access.

Scope

This PR addresses the tests relying on 1.1.1.1 identified in the issue.

Tests using TEST-NET-1 (192.0.2.0/24) and Class E addresses (240.0.0.0/4) were intentionally left unchanged, as they are outside the scope of this PR.

Testing

  • cargo test -p pingora-core connectors:: --features rustls --features any_tls

Closes #999

@byte-kort

Copy link
Copy Markdown
Author

Friendly bump, cc @drcaramelsyrup, saw you've worked on pingora-core before, mind taking a look when you get a chance?

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.

connectors tests connect to the real 1.1.1.1, so the suite cannot run without internet access

1 participant