Skip to content

Commit

Permalink
Merge pull request #35808 from thaJeztah/prevent-panic-in-test
Browse files Browse the repository at this point in the history
Prevent potential panic in TestLogsAPIUntil
  • Loading branch information
dnephin committed Dec 19, 2017
2 parents c492e76 + e77de78 commit 602bce1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions integration-cli/docker_api_logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ func (s *DockerSuite) TestLogsAPIUntil(c *check.C) {

// Get timestamp of second log line
allLogs := extractBody(c, types.ContainerLogsOptions{Timestamps: true, ShowStdout: true})
c.Assert(len(allLogs), checker.GreaterOrEqualThan, 3)

t, err := time.Parse(time.RFC3339Nano, strings.Split(allLogs[1], " ")[0])
c.Assert(err, checker.IsNil)
until := t.Format(time.RFC3339Nano)
Expand Down

0 comments on commit 602bce1

Please sign in to comment.