DockerCLI/cli/command
Laura Brehm c7f3031f74
tests/run: fix flaky `RunAttachTermination` test
This test was just incorrect (and testing incorrect
behavior): it was checking that `docker run` exited with a `context
canceled` error after signalling the CLI/cancelling the command's
context, but this was incorrect (and was fixed in
991b1303da - which was when this test
started failing).

However, since this test assertion was happening inside of a goroutine,
it would sometimes pass if this assertion didn't get to run before the
test suite terminated. It was flaky because sometimes this assertion
inside the goroutine did get to execute, but after the test finished
execution, which is a big no-no.

As an aside, assertions inside goroutines are generally bad, and `govet`
even has a linter for this (but it only catches `t.Fatal` and `t.FailNow`
calls and not `assert.Xx`.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
(cherry picked from commit eac83574c1)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-08-07 12:05:30 +02:00
..
builder test spring-cleaning 2024-07-19 13:37:27 +02:00
checkpoint test spring-cleaning 2024-07-19 13:37:27 +02:00
commands remove exec, push, pull, ps, images, info from "legacy" commands 2022-04-08 16:55:39 +02:00
completion cli/command/completion: add FromList utility 2024-07-19 01:56:24 +02:00
config test spring-cleaning 2024-07-19 13:37:27 +02:00
container tests/run: fix flaky `RunAttachTermination` test 2024-08-07 12:05:30 +02:00
context Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
formatter Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
idresolver Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
image test spring-cleaning 2024-07-19 13:37:27 +02:00
inspect Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
manifest test spring-cleaning 2024-07-19 13:37:27 +02:00
network test spring-cleaning 2024-07-19 13:37:27 +02:00
node test spring-cleaning 2024-07-19 13:37:27 +02:00
plugin test spring-cleaning 2024-07-19 13:37:27 +02:00
registry fix: ctx cancellation on login prompt 2024-07-19 01:46:16 +02:00
secret test spring-cleaning 2024-07-19 13:37:27 +02:00
service Allow for OomScoreAdj 2024-07-19 19:06:39 +02:00
stack test spring-cleaning 2024-07-19 13:37:27 +02:00
swarm test spring-cleaning 2024-07-19 13:37:27 +02:00
system test spring-cleaning 2024-07-19 13:37:27 +02:00
task linting: address slice-append issues found by gocritic 2023-11-20 16:02:17 +01:00
testdata Dynamically register kubernetes context store endpoint type. 2019-05-20 13:28:11 +01:00
trust test spring-cleaning 2024-07-19 13:37:27 +02:00
volume test spring-cleaning 2024-07-19 13:37:27 +02:00
cli.go add support for DOCKER_CUSTOM_HEADERS env-var (experimental) 2024-07-19 15:07:06 +02:00
cli_options.go add support for DOCKER_CUSTOM_HEADERS env-var (experimental) 2024-07-19 15:07:06 +02:00
cli_options_test.go golangci-lint: enable thelper linter 2023-11-20 16:02:17 +01:00
cli_test.go add support for DOCKER_CUSTOM_HEADERS env-var (experimental) 2024-07-19 15:07:06 +02:00
context.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
context_test.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
defaultcontextstore.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
defaultcontextstore_test.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
registry.go fix: ctx cancellation on login prompt 2024-07-19 01:46:16 +02:00
registry_test.go linting: fmt.Sprintf can be replaced with string concatenation (perfsprint) 2024-06-10 21:19:32 +02:00
telemetry.go OTel: implement missing MeterProvider `ForceFlush` 2024-05-15 00:05:31 +01:00
telemetry_docker.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
telemetry_options.go cli: make initializing the global meter- and tracing providers optional 2024-06-24 15:44:20 +02:00
telemetry_utils.go cli: Wrap Err stream 2024-06-11 17:59:48 +02:00
telemetry_utils_test.go cli: Wrap Err stream 2024-06-11 17:59:48 +02:00
trust.go Refactor content_trust cli/flags handling 2018-03-08 15:00:43 -05:00
utils.go fix: ctx cancellation on login prompt 2024-07-19 01:46:16 +02:00
utils_test.go fix: ctx cancellation on login prompt 2024-07-19 01:46:16 +02:00