-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extract inspect rendering logic to be display handlers (#1150)
Depends on spec change: #1156 Refactor: - Extract output formatting logic from the inspect command layer to an isolated display handler layer for processing rendering. - Add `json` and `tree` inspect handlers. Fix: - For `tree` output, make the key names with multiple words separated by space characters rather than capitalizing the words, which is defined in the [inspect command spec](https://github.com/notaryproject/notation/blob/v1.2.0/specs/commandline/inspect.md#inspect-signatures-on-the-supplied-oci-artifact-identified-by-the-digest). - For `json` output, default to rendering time in RFC3339 with nanoseconds (Notation expiry, signing time and certificate expiry are accurate to 1 second. Timestamp [RFC 3161](https://www.rfc-editor.org/rfc/rfc3161#section-2.4.2) can have fraction-of-second time value). E2E Test: - inspect signature with timestamp, signature expiry and user metadata (text, json) - inspect signatures with invalid timestamp (test, json) - inspect with `-o` shorthand. Resolves part of #1151 --------- Signed-off-by: Junjie Gao <[email protected]>
- Loading branch information
Showing
33 changed files
with
1,403 additions
and
330 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.