Skip to content

integration: remove assertAttachedStream, check both STDERR and STDOUT#49338

Merged
robmry merged 1 commit intomoby:masterfrom
thaJeztah:integration_rm_assertAttachedStream
Jan 27, 2025
Merged

integration: remove assertAttachedStream, check both STDERR and STDOUT#49338
robmry merged 1 commit intomoby:masterfrom
thaJeztah:integration_rm_assertAttachedStream

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

This helper was not marked as t.Helper(), and didn't do a great job at actually asserting the expected output streams. The existing checks could've been replaced by a io.Readall to do a fuzzy check for the response, but let's abstract away what it's doing, and properly check both STDOUT and STDERR.

make BIND_DIR=. TEST_FILTER='TestTemplated' DOCKER_GRAPHDRIVER=vfs test-integration
...
INFO: Testing against a local daemon
=== RUN   TestTemplatedConfig
--- PASS: TestTemplatedConfig (11.73s)
PASS
INFO: Testing against a local daemon
=== RUN   TestTemplatedSecret
--- PASS: TestTemplatedSecret (11.04s)
PASS

- Description for the changelog

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

This helper was not marked as t.Helper(), and didn't do a great job at
actually asserting the expected output streams. The existing checks
could've been replaced by a io.Readall to do a fuzzy check for the
response, but let's abstract away what it's doing, and properly check
both STDOUT and STDERR.

    make BIND_DIR=. TEST_FILTER='TestTemplated' DOCKER_GRAPHDRIVER=vfs test-integration
    ...
    INFO: Testing against a local daemon
    === RUN   TestTemplatedConfig
    --- PASS: TestTemplatedConfig (11.73s)
    PASS
    INFO: Testing against a local daemon
    === RUN   TestTemplatedSecret
    --- PASS: TestTemplatedSecret (11.04s)
    PASS

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added status/2-code-review area/testing kind/refactor PR's that refactor, or clean-up code labels Jan 26, 2025
@thaJeztah thaJeztah added this to the 28.0.0 milestone Jan 26, 2025
@thaJeztah thaJeztah self-assigned this Jan 26, 2025
Copy link
Copy Markdown

@p1-0tr p1-0tr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@robmry robmry merged commit c2a5105 into moby:master Jan 27, 2025
@thaJeztah thaJeztah deleted the integration_rm_assertAttachedStream branch January 27, 2025 16:06
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.

3 participants