diff --git a/test/e2e/suite/command/cp.go b/test/e2e/suite/command/cp.go index 110c56679..11683c51e 100644 --- a/test/e2e/suite/command/cp.go +++ b/test/e2e/suite/command/cp.go @@ -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)) @@ -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)) }