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

Add has_internet function to test_helpers #38

Merged
merged 1 commit into from
Jan 5, 2022
Merged

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Jan 5, 2022

Description

Quick helper to determine if internet is available. Got this solution from https://stackoverflow.com/questions/3764291.

Testing

  • [n/a] Passes unit tests on MacOS, linux, Windows (at least one required)
  • Functional testing (MacOS and Windows)

Functional testing

Ran on local Mac and Windows and got expected True. Ran on cheru and got expected False.

Copy link
Contributor

@jeanconn jeanconn left a comment

Choose a reason for hiding this comment

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

LGTM. I assume socket plays nice on windows as well. In running testr tests, I don't know... do we more often need to know if the machine has internet or if the machine is on GRETA (and do we handle those about the same?)?

@taldcroft
Copy link
Member Author

I just tested on Windows and it worked fine, good idea.

Fundamentally we want to know if the machine has internet. That could be me running tests while on a plane, who knows.

@taldcroft taldcroft merged commit 27e136d into master Jan 5, 2022
@taldcroft taldcroft deleted the has-internet branch January 5, 2022 18:36
@javierggt javierggt mentioned this pull request Feb 8, 2022
3 tasks
@javierggt javierggt mentioned this pull request Aug 3, 2022
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