Skip to content

Conversation

@thaJeztah
Copy link
Member

cli/command/registry: cleanup search tests

  • TestSearchContext: don't use un-keyed structs
  • TestSearchContext: don't use CompareMultipleValues as it was not needed
  • TestSearchContextDescription: don't use un-keyed structs
  • TestSearchContextDescription: don't use CompareMultipleValues as it was not needed
  • TestSearchContextWrite: don't use un-keyed structs, and include the
    code-comments into the test-table as names for the tests to give them
    some context.
  • TestSearchContextWriteJSON and TestSearchContextWriteJSONField were not
    validating the output format, but validating if the JSON output could
    be marshalled back to a struct. Let's just role them into TestSearchContextWrite.

cli/command/registry: cleanup login tests

  • use consts for fixed values, and rename some for clarity
  • remove testAuthErrors map and inline the logic (same as we do for other cases)

- 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)

- TestSearchContext: don't use un-keyed structs
- TestSearchContext: don't use CompareMultipleValues as it was not needed
- TestSearchContextDescription: don't use un-keyed structs
- TestSearchContextDescription: don't use CompareMultipleValues as it was not needed
- TestSearchContextWrite: don't use un-keyed structs, and include the
  code-comments into the test-table as names for the tests to give them
  some context.
- TestSearchContextWriteJSON and TestSearchContextWriteJSONField were not
  validating the output format, but validating if the JSON output could
  be marshalled back to a struct. Let's just role them into TestSearchContextWrite.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
- use consts for fixed values, and rename some for clarity
- remove testAuthErrors map and inline the logic (same as we do for other cases)

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 Aug 8, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2023

Codecov Report

Merging #4488 (57f0e46) into master (dc13592) will not change coverage.
Report is 2 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4488   +/-   ##
=======================================
  Coverage   59.39%   59.39%           
=======================================
  Files         288      288           
  Lines       24782    24782           
=======================================
  Hits        14720    14720           
  Misses       9175     9175           
  Partials      887      887           

@thaJeztah thaJeztah requested review from laurazard and vvoland August 8, 2023 20:01
@thaJeztah thaJeztah added this to the 25.0.0 milestone Aug 9, 2023
@thaJeztah thaJeztah merged commit 53671c2 into docker:master Aug 9, 2023
@thaJeztah thaJeztah deleted the registry_test_cleanups branch August 9, 2023 10:04
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