add unit tests for package cli/command/secret#32289
Conversation
dnephin
left a comment
There was a problem hiding this comment.
Thanks! this looks good, but there are some missing comments causing CI to fail
4e6c738 to
1771f02
Compare
|
Thank you for the review. I fixed the comments that were not written correctly and updated the PR. |
|
Looks like tests are failing @adshmh |
a45258a to
7c4770b
Compare
|
Thank you for the notification. I think it was due to using multiple labels for test objects (Secret) and the order they appeared in the output (interestingly, all unit-tests passed on my test machine all the time). |
cli/command/secret/create_test.go
Outdated
There was a problem hiding this comment.
It's a nit but I think we could even just use "requires exactly 2 argument(s)" here 👼
There was a problem hiding this comment.
Thank you for the review. The PR is now updated (removed references to the command name from the tests expected errors).
cli/command/secret/create_test.go
Outdated
cli/command/secret/remove_test.go
Outdated
Signed-off-by: Arash Deshmeh <[email protected]>
7c4770b to
243a8e6
Compare
…and-secret-package add unit tests for package cli/command/secret
This PR adds unit tests for all commands under cli/command/secret package (create, list, inspect, and remove). Part of the work on #31217
Signed-off-by: Arash Deshmeh [email protected]
- What I did
Added unit tests for all the commands in package cli/command/secret
- How I did it
Added unit tests and supporting code (builders + test data files in testdata directory) for all the commands in cli/command/secret package (create, ls, inspect, and remove)
- How to verify it
Run the unit tests.
There are no unit tests for the cli/command/secret package in current version (no test files)
With this PR:
$ make test-unit
...
ok github.com/docker/docker/cli/command/secret 0.069s coverage: 93.2% of statements
...
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)