Skip to content

Commit

Permalink
regression test
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
  • Loading branch information
wangxiaoxuan273 committed Mar 25, 2024
1 parent d831f06 commit 6b24784
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/e2e/suite/command/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package command

import (
"fmt"
"path/filepath"
"regexp"

. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -108,5 +109,13 @@ var _ = Describe("OCI image layout users:", func() {
It("should add multiple tags to an existent manifest when providing tag reference", func() {
tagAndValidate(PrepareTempOCI(ImageRepo), multi_arch.Tag, multi_arch.Digest, "tag1-via-tag", "tag1-via-tag", "tag1-via-tag")
})
It("should be able to retag a manifest at the current directory", func() {
root := PrepareTempOCI(ImageRepo)
dir := filepath.Dir(root)
ref := filepath.Base(root)
ORAS("tag", LayoutRef(ref, multi_arch.Tag), Flags.Layout, "latest").WithWorkDir(dir).MatchKeyWords("Tagging [oci-layout]", "Tagged latest").Exec()
ORAS("tag", LayoutRef(ref, multi_arch.Tag), Flags.Layout, "tag2").WithWorkDir(dir).MatchKeyWords("Tagging [oci-layout]", "Tagged tag2").Exec()
ORAS("repo", "tags", Flags.Layout, LayoutRef(ref, multi_arch.Tag)).WithWorkDir(dir).MatchKeyWords(multi_arch.Tag, "latest", "tag2").Exec()
})
})
})

0 comments on commit 6b24784

Please sign in to comment.