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

integ-cli: remove ICMP dependency from test, use nslookup #11310

Merged
merged 1 commit into from
Mar 11, 2015
Merged

integ-cli: remove ICMP dependency from test, use nslookup #11310

merged 1 commit into from
Mar 11, 2015

Conversation

ahmetb
Copy link
Contributor

@ahmetb ahmetb commented Mar 11, 2015

As we started running CI machines on Azure cloud and Azure
doesn't have ICMP stack implemented (yes, you heard right)
replacing ping 8.8.8.8 with nslookup google.com.

Signed-off-by: Ahmet Alp Balkan ahmetalpbalkan@gmail.com
cc: @tianon @jfrazelle @icecrime

if err != nil {
t.Fatalf("failed to run container: %v, output: %q", err, out)
t.Fatalf("failed to run container: %v, exitCode=%d, output: %q", err, ec, out)
Copy link
Contributor

Choose a reason for hiding this comment

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

@ahmetalpbalkan you won't like my comment but the exitCode is redundant since err will contain the exitcode in its message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This cmd actially exits with no msg or output. So if we keep the command like this exitCode is necessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ahmetalpbalkan if we do nslookup google.com can we remove exit code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tiborvass yeah.

As we started running CI machines on Azure cloud and Azure
doesn't have ICMP stack implemented by replacing
`ping 8.8.8.8` with `nslookup google.com`.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
@ahmetb
Copy link
Contributor Author

ahmetb commented Mar 11, 2015

@tiborvass @tianon updated to use nslookup google.com, it is much simpler now.

@jessfraz
Copy link
Contributor

LGTM

1 similar comment
@tiborvass
Copy link
Contributor

LGTM

tiborvass added a commit that referenced this pull request Mar 11, 2015
integ-cli: remove ICMP dependency from test, use nslookup
@tiborvass tiborvass merged commit d6a6c7d into moby:master Mar 11, 2015
// this will fail when Internet access is unavailable
func TestRunPingGoogle(t *testing.T) {
func TestRunLookupGoogleDns(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a really minor issue, but Dns should be DNS here.

My source is that the Docker coding style document says:

  1. All code should follow the guidelines covered in Effective Go and Go Code Review Comments.

Which has a section on initialisms at https://github.com/golang/go/wiki/CodeReviewComments#initialisms:

Words in names that are initialisms or acronyms (e.g. "URL" or "NATO") have a consistent case. For example, "URL" should appear as "URL" or "url" (as in "urlPony", or "URLPony"), never as "Url". Here's an example: ServeHTTP not ServeHttp.

Though I can see this file has multiple other instances of Dns instead of DNS, so this is probably a wide spread issue that is best addressed at scale.

Copy link
Member

Choose a reason for hiding this comment

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

@shurcooL If you want to contribute and open a PR to update, please do! 👍

mavenugo pushed a commit to mavenugo/docker that referenced this pull request Jun 29, 2016
This fixes a minor lint/style issue, improves consistency.

According to Go style, which this project follows, acronyms should have
a consistent case. Source: https://github.com/golang/go/wiki/CodeReviewComments#initialisms

See moby#11310 (comment).

Signed-off-by: Dmitri Shuralyov <shurcooL@gmail.com>
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.

None yet

10 participants