Skip to content

Conversation

@thaJeztah
Copy link
Member

These fields were deprecated in Docker 1.10 through 72f1881 (#18888), but were still used in various places and in tests.

daemon/events: rewrite test-assertions with gotest.tools

  • clean up "//import" comment, as test-files cannot be imported, and only
    one "//import" comment is needed per package.
  • remove some intermediate variables
  • rewrite assertions to use gotest.tools
  • use assert.Check()) (non-fatal) where possible

daemon/events: verify non-deprecated fields

Some tests were testing the deprecated fields, instead of their non-deprecated
alternatives.

This patch adds a utility to verify that they match, and rewrites the tests
to check the non-deprecated fields instead.

client: TestEvents: don't depend on deprecated fields

integration/container: TestPause: don't depend on deprecated fields

daemon: TestHealthStates: don't depend on deprecated fields

integration-cli: TestEventsFormat: rewrite test to not use deprecated fields

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

@thaJeztah thaJeztah changed the title Remove most uses of deprecated "Status", "ID", and "From" fields for events Remove uses of deprecated "Status", "ID", and "From" fields for events Aug 26, 2023
@thaJeztah thaJeztah force-pushed the events_deprecated_fields branch 2 times, most recently from e299f6a to 20244fb Compare August 26, 2023 15:09
- clean up "//import" comment, as test-files cannot be imported, and only
  one "//import" comment is needed per package.
- remove some intermediate variables
- rewrite assertions to use gotest.tools
- use assert.Check()) (non-fatal) where possible

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Some tests were testing the deprecated fields, instead of their non-deprecated
alternatives.

This patch adds a utility to verify that they match, and rewrites the tests
to check the non-deprecated fields instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
… fields

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the events_deprecated_fields branch from 20244fb to 333e04e Compare August 28, 2023 11:17
@thaJeztah thaJeztah requested a review from vvoland August 28, 2023 11:21
@thaJeztah thaJeztah added the area/api API label Aug 28, 2023
@thaJeztah thaJeztah merged commit 51a1c5f into moby:master Aug 28, 2023
@thaJeztah thaJeztah deleted the events_deprecated_fields branch August 28, 2023 14:35
@thaJeztah thaJeztah added this to the 25.0.0 milestone Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants