DockerCLI/cli/command
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
..
builder Fix builder prune -a/--all flag description 2020-02-18 14:30:28 +01:00
checkpoint cli/command/checkpoint: remove deprecated io/ioutil 2022-02-25 15:35:51 +01:00
commands Remove "docker engine" subcommands 2019-12-12 17:51:25 +01:00
config linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
container Fix flaky TestContainerList tests 2022-03-28 20:37:06 +02:00
context Output compact JSON by default for --format=json 2022-03-15 15:42:35 +01:00
formatter linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
idresolver bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
image linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
inspect linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
manifest remove unneeded "digest" alias for "go-digest" 2022-03-04 14:45:37 +01:00
network linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
node linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
plugin linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
registry linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
secret linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
service linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
stack linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
swarm cli/command/swarm: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:42:11 +01:00
system linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
task linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
testdata Dynamically register kubernetes context store endpoint type. 2019-05-20 13:28:11 +01:00
trust linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
volume linting: fix incorrectly formatted errors (revive) 2022-03-28 10:37:25 +02:00
cli.go Merge pull request #3136 from thaJeztah/remove_clientinfo 2022-03-15 15:12:22 +01:00
cli_options.go Implement WithDefaultContextStoreConfig() DockerCliOption 2022-03-03 14:47:59 +01:00
cli_options_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
cli_test.go Merge pull request #3136 from thaJeztah/remove_clientinfo 2022-03-15 15:12:22 +01:00
context.go remove obsolete mutli-orchestrator support 2022-02-22 15:28:12 +01:00
context_test.go remove obsolete mutli-orchestrator support 2022-02-22 15:28:12 +01:00
defaultcontextstore.go remove obsolete mutli-orchestrator support 2022-02-22 15:28:12 +01:00
defaultcontextstore_test.go cli/command: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:42:14 +01:00
events_utils.go updated vendoring 2017-09-01 19:41:06 -04:00
registry.go registry: don't call "/info" API endpoint to get default registry 2022-03-15 16:30:42 +01:00
registry_test.go registry: don't call "/info" API endpoint to get default registry 2022-03-15 16:30:42 +01:00
streams.go Extract streams helpers from command package to their own package to remove a cyclic dependency from command to internal/containerizedengine 2019-01-28 14:36:00 +01:00
trust.go Refactor content_trust cli/flags handling 2018-03-08 15:00:43 -05:00
utils.go build: remove PersistentPreRunE hack for experimental --platform 2020-11-16 14:58:11 +01:00
utils_test.go cli/command: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:42:14 +01:00