Return remote API errors as JSON

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
Ben Firshman
2016-05-21 12:56:04 +01:00
parent f6ff9acc63
commit 322e2a7d05
13 changed files with 135 additions and 59 deletions

View File

@@ -60,9 +60,7 @@ func (s *DockerSuite) TestLogsApiNoStdoutNorStderr(c *check.C) {
c.Assert(err, checker.IsNil)
expected := "Bad parameters: you must choose at least one stream"
if !bytes.Contains(body, []byte(expected)) {
c.Fatalf("Expected %s, got %s", expected, string(body[:]))
}
c.Assert(getErrorMessage(c, body), checker.Contains, expected)
}
// Regression test for #12704