Skip to content

Commit

Permalink
feat!: specify no-trunc for full snapshot ID
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
  • Loading branch information
austinvazquez committed Dec 25, 2024
1 parent 0cb4534 commit 1fb9890
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/image_history.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ func ImageHistory(o *option.Option) {
for _, quiet := range []string{"-q", "--quiet"} {
quiet := quiet
ginkgo.It(fmt.Sprintf("should only display snapshot ID with %s flag", quiet), func() {
ids := removeMissingID(command.StdoutAsLines(o, "image", "history", quiet, localImages[defaultImage]))
output := command.StdoutAsLines(o, "image", "history", quiet, "--no-trunc", localImages[defaultImage])
ids := removeMissingID(output)
gomega.Expect(ids).Should(gomega.HaveEach(gomega.MatchRegexp(sha256RegexFull)))
})
}

ginkgo.It("should only display snapshot ID with --format flag", func() {
ids := removeMissingID(command.StdoutAsLines(o, "image", "history", localImages[defaultImage], "--format", "{{.Snapshot}}"))
output := command.StdoutAsLines(o, "image", "history", "--no-trunc", localImages[defaultImage], "--format", "{{.Snapshot}}")
ids := removeMissingID(output)
gomega.Expect(ids).Should(gomega.HaveEach(gomega.MatchRegexp(sha256RegexFull)))
})

Expand Down

0 comments on commit 1fb9890

Please sign in to comment.