cli/command/context: improve tests and add coverage for custom metadata in contexts#5097
Merged
thaJeztah merged 3 commits intodocker:masterfrom May 31, 2024
Merged
Conversation
Signed-off-by: Sebastiaan van Stijn <[email protected]>
The CLI does not currently expose options to add custom metadata to contexts, but contexts support them. - update test-utilities to allow setting custom metadata - update the inspect test to verify that custom metadata is included when inspecting a context. - update the import/export tests to verify that custom metadata is preserved. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 task
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5097 +/- ##
==========================================
- Coverage 61.36% 61.34% -0.03%
==========================================
Files 298 295 -3
Lines 20706 20702 -4
==========================================
- Hits 12707 12700 -7
- Misses 7099 7100 +1
- Partials 900 902 +2 |
krissetto
reviewed
May 31, 2024
| @@ -0,0 +1,5 @@ | |||
| {"Current":false,"Description":"description of context1","DockerEndpoint":"https://someswarmserver.example.com","Error":"","Name":"context1"} | |||
Contributor
There was a problem hiding this comment.
Given the TestListJSON test above, shouldn't context1-2-3 contain the additional Type: metadata?
Member
Author
There was a problem hiding this comment.
Not currently, no; the JSON output in list format doesn't output the "raw" metadata, and doesn't include custom fields currently.
Should it include these? Maybe, maybe not (at least inspect shows them), but it's currently expected for them to not be here.
krissetto
approved these changes
May 31, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cli/command/context: add test-utility to create multiple contexts
cli/command/context: test inspecting context with custom metadata
The CLI does not currently expose options to add custom metadata to
contexts, but contexts support them.
when inspecting a context.
cli/command/context: list: add test for JSON output
- A picture of a cute animal (not mandatory but encouraged)