Fixed pt-mongodb-query-digest tests

This commit is contained in:
Carlos Salguero
2017-11-13 23:28:59 -03:00
parent 53fa5e8569
commit 43094be458
2 changed files with 10 additions and 19 deletions

View File

@@ -255,6 +255,7 @@ func getOptions() (*options, error) {
OrderBy: strings.Split(DEFAULT_ORDERBY, ","),
SkipCollections: strings.Split(DEFAULT_SKIPCOLLECTIONS, ","),
AuthDB: DEFAULT_AUTHDB,
OutputFormat: "text",
}
gop := getopt.New()
@@ -308,8 +309,8 @@ func getOptions() (*options, error) {
}
if opts.OutputFormat != "json" && opts.OutputFormat != "text" {
opts.OutputFormat = "text"
log.Infof("Invalid output format '%s'. Using text format", opts.OutputFormat)
opts.OutputFormat = "text"
}
if gop.IsSet("password") && opts.Password == "" {