Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64 tests #283

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ func testImage(t *testing.T, when spec.G, it spec.S) {
h.AssertNil(t, err)

// based on static base image refs
expectedTime := time.Date(2018, 10, 2, 17, 19, 34, 239926273, time.UTC)
expectedTime := time.Date(2024, 9, 26, 21, 31, 42, 0, time.UTC)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, this changed for linux/amd64 also, no? How does it still work if the linux/amd64 image digest stayed the same?

if daemonOS == "windows" {
expectedTime = time.Date(2020, 03, 04, 13, 28, 48, 673000000, time.UTC)
}
Expand Down
9 changes: 6 additions & 3 deletions remote/remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,12 @@ 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() {
it("returns a base image matching linux/architecture", 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
2 changes: 1 addition & 1 deletion testhelpers/testhelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ func RunnableBaseImage(os string) string {
// windows/amd64 image from manifest cached on github actions Windows 2019 workers: https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md#docker-images
return "mcr.microsoft.com/windows/nanoserver@sha256:08c883692e527b2bb4d7f6579e7707a30a2aaa66556b265b917177565fd76117"
}
return "busybox@sha256:915f390a8912e16d4beb8689720a17348f3f6d1a7b659697df850ab625ea29d5"
return "busybox@sha256:768e5c6f5cb6db0794eec98dc7a967f40631746c32232b78a3105fb946f3ab83"
}

func StringElementAt(elements []string, offset int) string {
Expand Down