client: ExecCreate: rename Tty to TTY

Align with ExecStartOptions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-11-05 14:07:32 +01:00
parent 7e92e1293d
commit 443b548efa
4 changed files with 6 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ func TestExecConsoleSize(t *testing.T) {
result, err := container.Exec(ctx, apiClient, cID, []string{"stty", "size"},
func(ec *client.ExecCreateOptions) {
ec.Tty = true
ec.TTY = true
ec.ConsoleSize = &[2]uint{57, 123}
},
)

View File

@@ -127,7 +127,7 @@ func TestExecResize(t *testing.T) {
cmd = []string{"sleep", "240"}
}
res, err := apiClient.ExecCreate(ctx, cID, client.ExecCreateOptions{
Tty: true, // Windows requires a TTY for the resize to work, otherwise fails with "is not a tty: failed precondition", see https://github.com/moby/moby/pull/48665#issuecomment-2412530345
TTY: true, // Windows requires a TTY for the resize to work, otherwise fails with "is not a tty: failed precondition", see https://github.com/moby/moby/pull/48665#issuecomment-2412530345
Cmd: cmd,
})
assert.NilError(t, err)