-
Notifications
You must be signed in to change notification settings - Fork 2k
Refactor trust view command into a --pretty flag on trust inspect #934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple small nits
cli/command/trust/inspect.go
Outdated
|
|
||
| type inspectOptions struct { | ||
| remotes []string | ||
| /* FIXME(n4ss): this is consistent with `docker service inspect` but we should provide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go comments are generally done with // even if they are multi-line. /* */ is only used for package comments.
| "github.com/theupdateframework/notary/tuf/data" | ||
| ) | ||
|
|
||
| /* TODO(n4ss): remove common tests with the regular inspect command */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same nit about comment
|
some build failures as well |
8f98b14 to
6cfc125
Compare
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
6cfc125 to
8c3d0b9
Compare
Codecov Report
@@ Coverage Diff @@
## master #934 +/- ##
==========================================
+ Coverage 53.91% 53.92% +<.01%
==========================================
Files 262 262
Lines 16601 16605 +4
==========================================
+ Hits 8951 8954 +3
Misses 7050 7050
- Partials 600 601 +1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks @n4ss!

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Signed-off-by: Nassim 'Nass' Eddequiouaq eddequiouaq.nassim@gmail.com
- What I did
docker trust viewwhich contains the same information asdocker trust inspectbut in a pretty-print format.--prettyflag ondocker trust inspect(same asdocker service inspect [--pretty]).docker trust viewto testdocker trust inspect --prettyinstead with the new output format (some duplicates tests are now present because the two original commands had some similar tests)docker trust inspect --pretty(olddocker trust view) now accepts several images as parameters to inspect (used to be limited to 1, butdocker trust inspectaccepts several images so we had to keep consistency)- How I did it
For now (I'll refactor that later),
docker trust inspectexecutes the old codepath if no--prettyflag is provided on the cli, otherwise executesdocker trust view's codepath for each image arguments.- How to verify it
$ make -f docker.Makefile testand
$ docker-dev trust inspect [--pretty] nginx:latest redis:latest docker:dind- Description for the changelog
docker trust viewto a--prettyflag ondocker trust inspect. Thedocker trust viewhas been removed.