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(ipv6): Do not run IPv6 tests if the host doesn't support IPv6 #1059

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

flub
Copy link
Contributor

@flub flub commented Jun 1, 2023

Seems some of the cross environments simply don't do IPv6 at all. In
that case there's no point in trying IPv6.

flub added 2 commits June 1, 2023 14:35
Seems some of the cross environments simply don't do IPv6 at all.  In
that case there's no point in supporting IPv6.
@@ -254,6 +254,9 @@ mod tests {

#[tokio::test]
async fn test_rebinding_conn_send_recv_ipv6() -> Result<()> {
if !crate::hp::netcheck::os_has_ipv6().await {
return Ok(());
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe a eprintln that this is being skipped? I wish there was a clearer way to communicate this..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

an eprinln is also captured by default though, so you won't see this unless the test fails (which won't happen) or you use --nocapture. it's not much of an improvement.

Copy link
Contributor

Choose a reason for hiding this comment

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

are you sure? asfaik stderr is printed in tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I tested it again. both stdout and stderr are captured in tests and not displayed unless the test fails.

I also wish we had a decent way to write a better test harness in rust, the reporting options are just not enough.

@flub flub merged commit e27cc77 into x-hp Jun 2, 2023
@flub flub deleted the flub/hp-host-ipv6 branch June 2, 2023 08:03
matheus23 pushed a commit that referenced this pull request Nov 14, 2024
…1059)

Seems some of the cross environments simply don't do IPv6 at all.  In
that case there's no point in supporting IPv6.
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.

2 participants