Files
docker-cli/components/engine/integration-cli
Aaron Lehmann 9fbd61f90d Fix flaky test TestLogsSince
This test can fail if it is run close to a second boundary:

    FAIL: docker_cli_logs_test.go:169: DockerSuite.TestLogsSince

    docker_cli_logs_test.go:183:
        c.Assert(out, checker.Not(checker.Contains), v,
    check.Commentf("unexpected log message returned, since=%v", since))
    ... obtained string = "" +
    ...     "2015-12-07T19:54:45.000551883Z 1449518084 log2\n" +
    ...     "2015-12-07T19:54:47.001310929Z 1449518086 log3\n"
    ... substring string = "log2"
    ... unexpected log message returned, since=1449518085

The problem is that it generates log lines using date +%s and uses that
timestamp as a reference for log filtering with (--since) later on in
the test. However, the timestamp that date +%s generates may not match
the log timestamp.

This commit changes the test to parse the log timestamp itself instead
of relying on a parallel timestamp.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 7ab0f9bf6142b828ac8972fae6cb8aabcaf1d742
Component: engine
2015-12-07 13:26:30 -08:00
..
2015-11-25 18:02:03 -08:00
2015-10-13 15:52:14 -07:00
2015-11-21 00:36:56 +08:00
2015-11-05 17:09:57 -05:00
2015-10-07 07:11:45 +08:00
2015-09-24 11:19:00 -07:00