Skip to content

testing: (fix, and) enable more Attach tests on Windows #43868

@thaJeztah

Description

@thaJeztah

Description

Related to

We currently disable various "Attach" tests on Windows; possibly due to ANSI control characters appearing in the output.

We should consider testing both with and without a TTY attached. wsContainersAttach calls out to ContainerAttach

err = s.backend.ContainerAttach(containerName, attachConfig)

which contains logic based on wether the container has a TTY or not;

moby/daemon/attach.go

Lines 53 to 54 in cf8b057

multiplexed := !ctr.Config.Tty && c.MuxStreams
inStream, outStream, errStream, err := c.GetStreams(multiplexed)

🤔 So, I guess that's covered in TestPostContainersAttach, which also is disabled on Windows (perhaps for the exact reason mentioned above?);

func (s *DockerAPISuite) TestPostContainersAttach(c *testing.T) {
testRequires(c, DaemonIsLinux)

When fixing that, we should also consider rewriting that test to use subtests, as it looks like it's testing quite some variations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions