mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-18 16:40:23 +00:00
PT-2236 - pt-secure-collect, pt-pg-summary do not follow PT standard (#652)
* PT-2236 - pt-secure-collect, pt-pg-summary do not follow PT standard for option --version - Redirected UsageWriter to os.Stdout for kingpin, so --version output goes to STDOUT, not to STDERR - Adjusted text, printed by the --version flag - Added test cases to check how --version flag works - Adjusted test cases, so they use TOOLNAME constant * PT-2236 - pt-secure-collect, pt-pg-summary do not follow PT standard for option --version Run go mod tidy as requested by Artem Gavrilov * PT-2236 - pt-secure-collect, pt-pg-summary do not follow PT standard for option --version Renamed const TOOLNAME to toolname to follow Go coding standards
This commit is contained in:
@@ -101,7 +101,7 @@ func TestParseArgs(t *testing.T) {
|
||||
want *cliOptions
|
||||
}{
|
||||
{
|
||||
args: []string{TOOLNAME}, // arg[0] is the command itself
|
||||
args: []string{toolname}, // arg[0] is the command itself
|
||||
want: &cliOptions{
|
||||
Host: DefaultHost,
|
||||
LogLevel: DefaultLogLevel,
|
||||
@@ -112,7 +112,7 @@ func TestParseArgs(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
args: []string{TOOLNAME, "zapp.brannigan.net:27018/samples", "--help"},
|
||||
args: []string{toolname, "zapp.brannigan.net:27018/samples", "--help"},
|
||||
want: nil,
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user