Skip to content

Commit

Permalink
ensure tests pass on arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
joeybrown-sf committed Nov 1, 2024
1 parent 186f89b commit caa6206
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions remote/remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()
})
Expand Down

0 comments on commit caa6206

Please sign in to comment.