Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Jan 30, 2024
1 parent a8f115e commit 97c58d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/e2e/suite/command/cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,13 @@ var _ = Describe("1.1 registry users:", func() {
src := RegistryRef(ZOTHost, ArtifactRepo, ma.Tag)
dstRepo := cpTestRepo("platform-referrers")
dst := RegistryRef(ZOTHost, dstRepo, "copiedTag")
digest := ma.LinuxAMD64.Digest.String()
ORAS("cp", src, dst, "-r", "--platform", "linux/amd64", "-v").
MatchStatus(stateKeys, true, len(stateKeys)).
MatchKeyWords("Digest: " + ma.LinuxAMD64.Digest.String()).
MatchKeyWords("Digest: " + digest).
Exec()
// validate
CompareRef(src, RegistryRef(ZOTHost, dstRepo, ma.LinuxAMD64.Digest.String()))
CompareRef(RegistryRef(ZOTHost, ArtifactRepo, digest), dst)
digests := ORAS("discover", dst, "--format", "{{range .Manifests}}{{println .Digest}}{{end}}").Exec().Out.Contents()
for _, digest := range strings.Split(strings.TrimSpace(string(digests)), "\n") {
CompareRef(RegistryRef(ZOTHost, ArtifactRepo, digest), RegistryRef(ZOTHost, dstRepo, digest))
Expand All @@ -284,7 +285,7 @@ var _ = Describe("1.1 registry users:", func() {
Exec()
// validate
CompareRef(RegistryRef(ZOTHost, ArtifactRepo, digest), RegistryRef(ZOTHost, dstRepo, digest))
digests := ORAS("discover", dst, "--format", "{{range .Manifests}}{{println .Digest}}{{end}}").Exec().Out.Contents()
digests := ORAS("discover", RegistryRef(ZOTHost, dstRepo, digest), "--format", "{{range .Manifests}}{{println .Digest}}{{end}}").Exec().Out.Contents()
for _, digest := range strings.Split(strings.TrimSpace(string(digests)), "\n") {
CompareRef(RegistryRef(ZOTHost, ArtifactRepo, digest), RegistryRef(ZOTHost, dstRepo, digest))
}
Expand Down

0 comments on commit 97c58d9

Please sign in to comment.