Skip to content

client: Client.ImageHistory: don't decorate error twice, and improve tests#48819

Merged
thaJeztah merged 3 commits intomoby:masterfrom
thaJeztah:image_history_nowrap
Nov 5, 2024
Merged

client: Client.ImageHistory: don't decorate error twice, and improve tests#48819
thaJeztah merged 3 commits intomoby:masterfrom
thaJeztah:image_history_nowrap

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

client: Client.ImageHistory: don't decorate error twice

I forgot to include this patch in 9603927,
which introduced the encodePlatform, which already decorates the error to
have a invalid platform: prefix.

While updating, also be more explicit on no result being returned on error.

client: TestImageHistory: use fixture for JSON response

Use a fixture instead of encoding with the current definition of the type,
to make sure we don't regress if any changes are made in the type.

client: TestImageHistory: add minimal test for platform

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

I forgot to include this patch in 9603927,
which introduced the encodePlatform, which already decorates the error to
have a `invalid platform:` prefix.

While updating, also be more explicit on no result being returned on error.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Use a fixture instead of encoding with the current definition of the type,
to make sure we don't regress if any changes are made in the type.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added this to the 28.0.0 milestone Nov 5, 2024
@thaJeztah thaJeztah self-assigned this Nov 5, 2024
@thaJeztah thaJeztah requested a review from vvoland November 5, 2024 12:30
@thaJeztah thaJeztah merged commit 6c2e77a into moby:master Nov 5, 2024
@thaJeztah thaJeztah deleted the image_history_nowrap branch November 5, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants