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

tests(iroh-net): expose run_relay_server and option to skip cert verification to tests #2145

Merged
merged 7 commits into from
Apr 8, 2024

Conversation

Frando
Copy link
Member

@Frando Frando commented Apr 4, 2024

Description

  • Add a test-utils feature to iroh-net. If enabled, expose the test_utils crate with fn run_relay_server publicly.
  • Add option to iroh_net::MagicEndpointBuilder to skip relay server SSL certificate verification. The option is behind a #[cfg(any(test, feature = "test-utils"))]
  • Add the same option to iroh::NodeBuilder, behind the same cfg option
  • Add a test to iroh which uses run_relay_server and then downloads a blob by connecting to a node with only node id and relay URL (no direct addresses)

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.

@Frando
Copy link
Member Author

Frando commented Apr 4, 2024

Also added a basic sync test with a ticket that only contains NodeId and relay URL, no direct addrs

iroh/Cargo.toml Outdated
iroh-test = { path = "../iroh-test" }
iroh-net = { path = "../iroh-net", features = ["test-utils"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

not needed, the test-utils feature already adds this

@dignifiedquire dignifiedquire added this to the v0.14.0 milestone Apr 8, 2024
@dignifiedquire
Copy link
Contributor

needs rebase

@Frando Frando enabled auto-merge April 8, 2024 12:53
@Frando Frando added this pull request to the merge queue Apr 8, 2024
Merged via the queue into main with commit fb4703a Apr 8, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants