-
Notifications
You must be signed in to change notification settings - Fork 94
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
cylc.hostuserutil: get_fqdn_by_host: include bad host name in error #2892
Conversation
@matthewrmshin - I just saw this - do you want to try to get it in 7.8.0? |
@hjoliver Up to you! |
self.assertFalse(is_remote_host(None)) | ||
self.assertFalse(is_remote_host('localhost')) | ||
self.assertFalse(is_remote_host(os.getenv('HOSTNAME'))) | ||
self.assertFalse(is_remote_host(get_host())) | ||
|
||
def test_get_fqdn_by_host_on_bad_host(self): | ||
"""get_fqdn_by_host bad host.""" | ||
bad_host = 'nosuchhost.nosuchdomain.org' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn it, I was planning to name my next computer like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, tests as working.
Matt, if you can get another Northern Hemisphere review on this, I'll merge it and make the release first thing in the morning (without needing to wait on Bruno). Over 'n out 🌙 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Same patch you mentioned in the issue, and neat solution using filename
.
Approved, but will leave merge up to Hilary when he's preparing the release. Time to hit the sack now. |
On failure of
socket.gethostbyname_ex
, add bad host name to error.Fix #2875.