From caa620605661a7b5e9907d8b3e0d3a5b09a952ca Mon Sep 17 00:00:00 2001 From: Joey Brown Date: Fri, 1 Nov 2024 16:17:48 -0500 Subject: [PATCH] ensure tests pass on arm64 --- remote/remote_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/remote/remote_test.go b/remote/remote_test.go index 56627807..3d43b2cb 100644 --- a/remote/remote_test.go +++ b/remote/remote_test.go @@ -272,7 +272,10 @@ func testImage(t *testing.T, when spec.G, it spec.S) { when("base image is a multi-OS/Arch manifest list", func() { it("returns a base image matching linux/amd64", func() { manifestListName := "golang:1.13.8" - existingLayerSha := "sha256:427da4a135b0869c1a274ba38e23d45bdbda93134c4ad99c8900cb0cfe9f0c9e" + existingLayerDigests := map[string]string{ + "amd64": "sha256:427da4a135b0869c1a274ba38e23d45bdbda93134c4ad99c8900cb0cfe9f0c9e", + "arm64": "sha256:c50765ba68c46491618574144955985555c2c7584137e69a0bd1017f411111d2", + } img, err := remote.NewImage( repoName, @@ -293,7 +296,7 @@ func testImage(t *testing.T, when spec.G, it spec.S) { h.AssertNil(t, err) h.AssertEq(t, arch, runtime.GOARCH) - readCloser, err := img.GetLayer(existingLayerSha) + readCloser, err := img.GetLayer(existingLayerDigests[runtime.GOARCH]) h.AssertNil(t, err) defer readCloser.Close() })