Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration/container: use subtests for TestAttach #45937

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jul 12, 2023

  • Combine TestAttachWithTTY and TestAttachWithoutTTy to a single test using sub-tests

  • Set up and tear-down the test-environment once

  • Remove redundant client.ContainerRemove, as it's taken care of by testEnv.Clean()

  • Run both tests in parallel

    make TEST_FILTER=TestAttach DOCKER_GRAPHDRIVER=overlay2 TESTDEBUG=1 test-integration
    Loaded image: busybox:latest
    Loaded image: busybox:glibc
    Loaded image: debian:bullseye-slim
    Loaded image: hello-world:latest
    Loaded image: arm32v7/hello-world:latest
    INFO: Testing against a local daemon
    === RUN   TestAttach
    === RUN   TestAttach/without_TTY
    === PAUSE TestAttach/without_TTY
    === RUN   TestAttach/with_TTY
    === PAUSE TestAttach/with_TTY
    === CONT  TestAttach/without_TTY
    === CONT  TestAttach/with_TTY
    --- PASS: TestAttach (0.00s)
        --- PASS: TestAttach/without_TTY (0.03s)
        --- PASS: TestAttach/with_TTY (0.03s)
    PASS
    
    DONE 3 tests in 1.347s
    

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah thaJeztah added status/2-code-review area/testing kind/refactor PR's that refactor, or clean-up code labels Jul 12, 2023
@thaJeztah
Copy link
Member Author

Looks like CI is broken, because the BuildKit tests don't pin to a minor Go version, so have been updated to go1.19.11;

2023-07-12T11:23:35.0244805Z #7 [internal] load metadata for docker.io/library/golang:1.19-alpine3.17

Which looks to have a regression;

integration/container/attach_test.go Outdated Show resolved Hide resolved
integration/container/attach_test.go Outdated Show resolved Hide resolved
- Combine TestAttachWithTTY and TestAttachWithoutTTy to a single test using sub-tests
- Set up and tear-down the test-environment once
- Remove redundant client.ContainerRemove, as it's taken care of by testEnv.Clean()
- Run both tests in parallel

      make TEST_FILTER=TestAttach DOCKER_GRAPHDRIVER=overlay2 TESTDEBUG=1 test-integration
      Loaded image: busybox:latest
      Loaded image: busybox:glibc
      Loaded image: debian:bullseye-slim
      Loaded image: hello-world:latest
      Loaded image: arm32v7/hello-world:latest
      INFO: Testing against a local daemon
      === RUN   TestAttach
      === RUN   TestAttach/without_TTY
      === PAUSE TestAttach/without_TTY
      === RUN   TestAttach/with_TTY
      === PAUSE TestAttach/with_TTY
      === CONT  TestAttach/without_TTY
      === CONT  TestAttach/with_TTY
      --- PASS: TestAttach (0.00s)
          --- PASS: TestAttach/without_TTY (0.03s)
          --- PASS: TestAttach/with_TTY (0.03s)
      PASS

      DONE 3 tests in 1.347s

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 25.0.0 milestone Jul 19, 2023
@thaJeztah thaJeztah merged commit 51fad48 into moby:master Jul 19, 2023
@thaJeztah thaJeztah deleted the testattach_table branch July 19, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing kind/refactor PR's that refactor, or clean-up code status/2-code-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants