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

Improve tests that need the Internet #24

Merged
merged 2 commits into from
Nov 18, 2020
Merged

Conversation

ppisar
Copy link

@ppisar ppisar commented Nov 18, 2020

No description provided.

@rurban
Copy link
Owner

rurban commented Nov 18, 2020

Is NO_NETWORK_TESTING used elsewhere already? I only see Perl-Toolchain-Gang/toolchain-site#3 which was never done.

Oh I see. Test::RequiresInternet does it, so it's fine

Copy link
Owner

@rurban rurban left a comment

Choose a reason for hiding this comment

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

Maybe you want to fix the subject line typo. Else fine. Force push ok

@ppisar
Copy link
Author

ppisar commented Nov 18, 2020 via email

This patch uses the addresses reserved for a documentation purpose
which should be unroutable instead of just a random address.
If a host cannot resolve the host names, the tests fail like:

getaddrinfo(www.google.com.,,AF_INET) failed - Temporary failure in name resolution at /builddir/build/BUILD/Net-Ping-2.74/blib/lib/Net/Ping.pm line 1925.

The tests recommend setting PERL_CORE=1, but PERL_CORE has a different
meaning.

This patch recognizes a NO_NETWORK_TESTING environment variable to
skip non-localhost tests. This is alike to Test::RequiresInternet. The
patch also coerces the remaining tests to use loopback addresses
instead.
@rurban rurban merged commit a90fbd5 into rurban:master Nov 18, 2020
@rurban
Copy link
Owner

rurban commented Nov 18, 2020

Thanks, users will like it!

toddr added a commit to toddr/perl that referenced this pull request Oct 19, 2022
[DELTA]

2.75  2022-09-01 12:44:03 rurban
      Minor
      - Modernized the synopsis (rurban/Net-Ping#31)
      - Fixed a link in a comment (rurban/Net-Ping#25)
      META Changes
      - Remove some TEST_REQUIRES (rurban/Net-Ping#23)
      Test fixes
      - Support NO_NETWORK_TESTING=1 (rurban/Net-Ping#24)
      - Fix non-routable addresses for negative tests (rurban/Net-Ping#24)
toddr added a commit to toddr/perl that referenced this pull request Oct 19, 2022
[DELTA]

2.75  2022-09-01 12:44:03 rurban
      Minor
      - Modernized the synopsis (rurban/Net-Ping#31)
      - Fixed a link in a comment (rurban/Net-Ping#25)
      META Changes
      - Remove some TEST_REQUIRES (rurban/Net-Ping#23)
      Test fixes
      - Support NO_NETWORK_TESTING=1 (rurban/Net-Ping#24)
      - Fix non-routable addresses for negative tests (rurban/Net-Ping#24)
toddr added a commit to Perl/perl5 that referenced this pull request Oct 19, 2022
[DELTA]

2.75  2022-09-01 12:44:03 rurban
      Minor
      - Modernized the synopsis (rurban/Net-Ping#31)
      - Fixed a link in a comment (rurban/Net-Ping#25)
      META Changes
      - Remove some TEST_REQUIRES (rurban/Net-Ping#23)
      Test fixes
      - Support NO_NETWORK_TESTING=1 (rurban/Net-Ping#24)
      - Fix non-routable addresses for negative tests (rurban/Net-Ping#24)
scottchiefbaker pushed a commit to scottchiefbaker/perl5 that referenced this pull request Nov 3, 2022
[DELTA]

2.75  2022-09-01 12:44:03 rurban
      Minor
      - Modernized the synopsis (rurban/Net-Ping#31)
      - Fixed a link in a comment (rurban/Net-Ping#25)
      META Changes
      - Remove some TEST_REQUIRES (rurban/Net-Ping#23)
      Test fixes
      - Support NO_NETWORK_TESTING=1 (rurban/Net-Ping#24)
      - Fix non-routable addresses for negative tests (rurban/Net-Ping#24)
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