X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4ffe3382ff35cebce873668dfdfad2eef2def3d3..cb73538f0851cea402a0544861966c2515a24b5b:/lib/config/cmd_test.go?ds=inline diff --git a/lib/config/cmd_test.go b/lib/config/cmd_test.go index 2bb596a05a..c2854895ca 100644 --- a/lib/config/cmd_test.go +++ b/lib/config/cmd_test.go @@ -33,7 +33,7 @@ func (s *CommandSuite) SetUpSuite(c *check.C) { func (s *CommandSuite) TestDump_BadArg(c *check.C) { var stderr bytes.Buffer code := DumpCommand.RunCommand("arvados config-dump", []string{"-badarg"}, bytes.NewBuffer(nil), bytes.NewBuffer(nil), &stderr) - c.Check(code, check.Equals, 2) + c.Check(code, check.Equals, cmd.EXIT_INVALIDARGUMENT) c.Check(stderr.String(), check.Equals, "error parsing command line arguments: flag provided but not defined: -badarg (try -help)\n") } @@ -69,8 +69,6 @@ Clusters: Type: select Options: fuchsia: {} - ApplicationMimetypesWithViewIcon: - whitespace: {} ` code := CheckCommand.RunCommand("arvados config-check", []string{"-config", "-"}, bytes.NewBufferString(in), &stdout, &stderr) c.Check(code, check.Equals, 0) @@ -124,12 +122,10 @@ Clusters: Type: select Options: fuchsia: {} - ApplicationMimetypesWithViewIcon: - whitespace: {} ` code := CheckCommand.RunCommand("arvados config-check", []string{"-config", "-"}, bytes.NewBufferString(in), &stdout, &stderr) c.Check(code, check.Equals, 1) - c.Check(stderr.String(), check.Matches, `(?s).*Error loading vocabulary file.*for cluster.*\nduplicate JSON key "tags.IDfoo".*`) + c.Check(stderr.String(), check.Matches, `(?ms).*Error loading vocabulary file.*for cluster.*duplicate JSON key.*tags.IDfoo.*`) } func (s *CommandSuite) TestCheck_DeprecatedKeys(c *check.C) { @@ -217,7 +213,7 @@ Clusters: code := DumpCommand.RunCommand("arvados config-dump", []string{"-config", "-"}, bytes.NewBufferString(in), &stdout, &stderr) c.Check(code, check.Equals, 0) c.Check(stdout.String(), check.Matches, `(?ms).*TimeoutBooting: 10m\n.*`) - c.Check(stdout.String(), check.Matches, `(?ms).*http://localhost:12345/: {}\n.*`) + c.Check(stdout.String(), check.Matches, `(?ms).*http://localhost:12345/:\n +ListenURL: ""\n.*`) } func (s *CommandSuite) TestDump_UnknownKey(c *check.C) {