DockerCLI/cli
Sebastiaan van Stijn 8e2d63d5df
Fix flaky TestContainerList tests
These tests were creating a stub container, using the current timestamp as
created date. However, if CI was slow to run the test, `Less than a second ago`
would change into `1 second ago`, causing the test to fail:

    --- FAIL: TestContainerListNoTrunc (0.00s)
        list_test.go:198: assertion failed:
            --- expected
            +++ actual
            @@ -1,4 +1,4 @@
            -CONTAINER ID   IMAGE            COMMAND   CREATED                  STATUS        PORTS     NAMES
            -container_id   busybox:latest   "top"     Less than a second ago   Up 1 second             c1
            -container_id   busybox:latest   "top"     Less than a second ago   Up 1 second             c2,foo/bar
            +CONTAINER ID   IMAGE            COMMAND   CREATED        STATUS        PORTS     NAMES
            +container_id   busybox:latest   "top"     1 second ago   Up 1 second             c1
            +container_id   busybox:latest   "top"     1 second ago   Up 1 second             c2,foo/bar

This patch changes the "created" time of the container to be a minute ago. This
will result in `About a minute ago`, with a margin of 1 minute.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-28 20:37:06 +02:00
..
command Fix flaky TestContainerList tests 2022-03-28 20:37:06 +02:00
compose linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
config linting: ignore some "G101: Potential hardcoded credentials" warnings 2022-03-28 10:37:22 +02:00
connhelper gofmt with go1.17 2022-03-26 20:21:00 +01:00
context remove unneeded "digest" alias for "go-digest" 2022-03-04 14:45:37 +01:00
debug updated vendoring 2017-09-01 19:41:06 -04:00
flags Update list commands with better format flag description 2022-03-15 15:35:53 +01:00
manifest remove unneeded "digest" alias for "go-digest" 2022-03-04 14:45:37 +01:00
registry/client remove unneeded "digest" alias for "go-digest" 2022-03-04 14:45:37 +01:00
streams update docker, replace github.com/docker/pkg/term, github.com/docker/pkg/mount 2020-04-22 17:16:13 +02:00
trust remove unneeded "digest" alias for "go-digest" 2022-03-04 14:45:37 +01:00
version Move versioning variables to a separate package. 2019-01-29 11:26:40 +00:00
winresources Use goversioninfo to create Windows Version Info 2021-10-11 16:54:22 +02:00
cobra.go remove alias for cli/config imports 2022-03-04 14:45:33 +01:00
cobra_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
error.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
required.go Disable unparam linter: cli/required.go:102:16: `pluralize` - `word` always receives `"argument"` (unparam) 2019-10-31 19:22:22 +01:00
required_test.go cli: remove deprecated io/ioutil 2022-02-25 15:42:19 +01:00