DockerCLI/cli
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
..
command tests/run: fix flaky `RunAttachTermination` test 2024-08-07 12:05:30 +02:00
compose Allow for OomScoreAdj 2024-07-19 19:06:39 +02:00
config test spring-cleaning 2024-07-19 13:37:27 +02:00
connhelper tests: fix other flaky `connhelper` tests 2024-07-24 12:19:22 +01:00
context cli/context/store: Names(): fix panic when called with nil-interface 2024-07-19 01:56:25 +02:00
debug command: include default otel error handler for the cli 2024-04-03 12:01:28 -05:00
flags cli: move "config" flag to cli/flags/ClientOptions.InstallFlags() 2023-06-28 16:04:09 +02:00
hints login: Add message about using PATs 2023-08-03 10:35:04 +02:00
manifest linting: fmt.Sprintf can be replaced with string concatenation (perfsprint) 2024-06-10 21:19:32 +02:00
registry/client use local ConvertToHostname() implementation 2024-06-14 00:25:21 +02:00
streams cli/streams: minor refactoring and docs touch-ups 2023-04-03 11:27:26 +02:00
trust chore: remove deprecated DualStack field 2024-04-15 17:53:35 +08: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 Removed all mentions of "please" from docs and messages 2024-06-11 16:53:40 +02:00
cobra_test.go cli: use custom annotation for aliases 2022-06-28 17:32:09 +02:00
error.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
required.go format (GoDoc) comments with Go 1.19 to prepare for go updates 2022-07-19 19:10:16 +02:00
required_test.go test spring-cleaning 2024-07-19 13:37:27 +02:00