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

Rename -hostname to -server #48

Merged
merged 2 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cmd/ndt7-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// The (DEPRECATED) `-batch` flag is equivalent to `-format json`, and the
// latter should be used instead.
//
// The `-hostname <name>` flag specifies to use the `name` hostname for
// performing the ndt7 test. The default is to auto-discover a suitable
// server by using Measurement Lab's locate service.
// The `-server <name>` (previously `-hostname`) flag specifies to use the
// `name` hostname for performing the ndt7 test. The default is to
// auto-discover a suitable server by using Measurement Lab's locate service.
//
// The `-no-verify` flag allows to skip TLS certificate verification.
//
Expand Down Expand Up @@ -109,7 +109,7 @@ var (
flagBatch = flag.Bool("batch", false, "emit JSON events on stdout "+
"(DEPRECATED, please use -format=json)")
flagNoVerify = flag.Bool("no-verify", false, "skip TLS certificate verification")
flagHostname = flag.String("hostname", "", "optional ndt7 server hostname")
flagServer = flag.String("server", "", "optional ndt7 server hostname")
flagTimeout = flag.Duration(
"timeout", defaultTimeout, "time after which the test is aborted")
flagQuiet = flag.Bool("quiet", false, "emit summary and errors only")
Expand Down Expand Up @@ -258,7 +258,7 @@ func main() {
r.client.Dialer.TLSClientConfig = &tls.Config{
InsecureSkipVerify: *flagNoVerify,
}
r.client.FQDN = *flagHostname
r.client.FQDN = *flagServer

var e emitter.Emitter

Expand Down
4 changes: 2 additions & 2 deletions cmd/ndt7-client/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ func TestDownloadError(t *testing.T) {
osExit = func(code int) {
exitval = code
}
*flagHostname = "\t" // fail parsing
*flagServer = "\t" // fail parsing
main()
*flagHostname = ""
*flagServer = ""
osExit = savedFunc
if exitval == 0 {
t.Fatal("expected nonzero return code here")
Expand Down