summaryrefslogtreecommitdiff
path: root/integration/internal
diff options
context:
space:
mode:
authorPaweł Gronowski <pawel.gronowski@docker.com>2022-05-12 14:54:44 +0200
committerPaweł Gronowski <pawel.gronowski@docker.com>2022-05-19 07:57:27 +0200
commit85a7f5a09af9c2d387c89df4d9de61c4322a2843 (patch)
treefcaa79645c8c65f160906fd5a6c5ef4636cdb057 /integration/internal
parent1a0587bd766e3ab1f6dbe808a94a41a2f54d9126 (diff)
downloaddocker-85a7f5a09af9c2d387c89df4d9de61c4322a2843.tar.gz
daemon/linux: Set console size on creation
On Linux the daemon was not respecting the HostConfig.ConsoleSize property and relied on cli initializing the tty size after the container was created. This caused a delay between container creation and the tty actually being resized. This is also a small change to the api description, because HostConfig.ConsoleSize is no longer Windows-only. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Diffstat (limited to 'integration/internal')
-rw-r--r--integration/internal/container/ops.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/integration/internal/container/ops.go b/integration/internal/container/ops.go
index 0a600361aa..0d94a4ebf7 100644
--- a/integration/internal/container/ops.go
+++ b/integration/internal/container/ops.go
@@ -227,3 +227,10 @@ func WithIsolation(isolation containertypes.Isolation) func(*TestContainerConfig
c.HostConfig.Isolation = isolation
}
}
+
+// WithConsoleSize sets the initial console size of the container
+func WithConsoleSize(width, height uint) func(*TestContainerConfig) {
+ return func(c *TestContainerConfig) {
+ c.HostConfig.ConsoleSize = [2]uint{height, width}
+ }
+}