mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 13:11:30 +00:00
Merge pull request #16366 from MHBauer/logs-refactor
refactor logs to not use internal data structures
This commit is contained in:
@@ -82,3 +82,10 @@ func (s *DockerSuite) TestLogsApiFollowEmptyOutput(c *check.C) {
|
||||
c.Fatalf("HTTP response was not immediate (elapsed %.1fs)", elapsed)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestLogsAPIContainerNotFound(c *check.C) {
|
||||
name := "nonExistentContainer"
|
||||
resp, _, err := sockRequestRaw("GET", fmt.Sprintf("/containers/%s/logs?follow=1&stdout=1&stderr=1&tail=all", name), bytes.NewBuffer(nil), "")
|
||||
c.Assert(err, check.IsNil)
|
||||
c.Assert(resp.StatusCode, check.Equals, http.StatusNotFound)
|
||||
}
|
||||
|
||||
@@ -374,3 +374,10 @@ func (s *DockerSuite) TestLogsFollowGoroutinesNoOutput(c *check.C) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestLogsCLIContainerNotFound(c *check.C) {
|
||||
name := "testlogsnocontainer"
|
||||
out, _, _ := dockerCmdWithError("logs", name)
|
||||
message := fmt.Sprintf(".*no such id: %s.*\n", name)
|
||||
c.Assert(out, check.Matches, message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user