X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/97d368d1f14a17b0c4d847a22b51444b577f4bab..6e73eff3926a2e7345333edd02531e8e6fbe15ef:/lib/config/cmd_test.go diff --git a/lib/config/cmd_test.go b/lib/config/cmd_test.go index bedcc0dd8c..e4d838f85a 100644 --- a/lib/config/cmd_test.go +++ b/lib/config/cmd_test.go @@ -79,6 +79,25 @@ Clusters: c.Check(stderr.String(), check.Matches, `(?ms).*unexpected object in config entry: Clusters.z1234.PostgreSQL.ConnectionPool\n.*`) } +func (s *CommandSuite) TestDumpFormatting(c *check.C) { + var stdout, stderr bytes.Buffer + in := ` +Clusters: + z1234: + Containers: + CloudVMs: + TimeoutBooting: 600s + Services: + Controller: + InternalURLs: + http://localhost:12345: {} +` + code := DumpCommand.RunCommand("arvados config-dump", nil, 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.*`) +} + func (s *CommandSuite) TestDumpUnknownKey(c *check.C) { var stdout, stderr bytes.Buffer in := `