DockerCLI/e2e/container
Laura Brehm 66aa0f672c
attach: don't return context cancelled error
In 3f0d90a2a9 we introduced a global
signal handler and made sure all the contexts passed into command
execution get (appropriately) cancelled when we get a SIGINT.

Due to that change, and how we use this context during `docker attach`,
we started to return the context cancelation error when a user signals
the running `docker attach`.

Since this is the intended behavior, we shouldn't return an error, so
this commit adds checks to ignore this specific error in this case.

Also adds a regression test.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-07-25 00:49:33 +01:00
..
testdata e2e: Update alpine to 3.17.2 2023-04-27 10:58:02 +02:00
attach_test.go attach: don't return context cancelled error 2024-07-25 00:49:33 +01:00
create_test.go cli/container: Don't ignore error when parsing volume spec 2023-07-12 09:45:55 +02:00
kill_test.go golangci-lint: enable thelper linter 2023-11-20 16:02:17 +01:00
main_test.go Add an end-to-end test for container run 2017-09-06 17:07:38 -04:00
proxy_signal_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
run_test.go test: e2e SIGTERM attached container on `docker run` 2024-07-09 13:23:38 +02:00