Skip to content

Commit

Permalink
feat: specify no-trunc for full snapshot ID (#201)
Browse files Browse the repository at this point in the history
feat!: specify no-trunc for full snapshot ID

Signed-off-by: Austin Vazquez <[email protected]>
  • Loading branch information
austinvazquez authored Dec 27, 2024
1 parent c08fc48 commit c32f6bf
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 @@ -35,13 +35,15 @@ func ImageHistory(o *option.Option) {

for _, quiet := range []string{"-q", "--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 c32f6bf

Please sign in to comment.