From 97c58d99334314b69b61f4ac9f9d31f12e2d8cf8 Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Tue, 30 Jan 2024 07:05:07 +0000 Subject: [PATCH] fix e2e Signed-off-by: Billy Zha --- test/e2e/suite/command/cp.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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)) }