From 51703115780ed14316bfcf1586c623b792003e34 Mon Sep 17 00:00:00 2001 From: Joey Date: Wed, 27 Nov 2024 12:50:29 -0600 Subject: [PATCH] make sure acceptance tests pass on arm64 Signed-off-by: Joey Brown --- acceptance/acceptance_test.go | 16 +++++++++++----- .../multi-platform-buildpack/buildpack.toml | 4 ++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index f837988e09..4ab78a4e1d 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -337,6 +337,7 @@ func testWithoutSpecificBuilderRequirement( "--path", path, "--publish", "--target", "linux/amd64", + "--target", "linux/arm64", "--target", "windows/amd64", ) @@ -347,7 +348,7 @@ func testWithoutSpecificBuilderRequirement( assertImage.CanBePulledFromRegistry(packageName) assertions.NewOutputAssertionManager(t, output).ReportsSuccessfulIndexPushed(packageName) - h.AssertRemoteImageIndex(t, packageName, types.OCIImageIndex, 2) + h.AssertRemoteImageIndex(t, packageName, types.OCIImageIndex, 3) }) }) @@ -374,6 +375,7 @@ func testWithoutSpecificBuilderRequirement( "--config", packageTomlPath, "--publish", "--target", "linux/amd64", + "--target", "linux/arm64", "--target", "windows/amd64", "--verbose", ) @@ -402,6 +404,7 @@ func testWithoutSpecificBuilderRequirement( "--path", depPath, "--publish", "--target", "linux/amd64", + "--target", "linux/arm64", "--target", "windows/amd64", ) assertions.NewOutputAssertionManager(t, output).ReportsPackagePublished(depPackageName) @@ -423,6 +426,7 @@ func testWithoutSpecificBuilderRequirement( "--config", packageTomlPath, "--publish", "--target", "linux/amd64", + "--target", "linux/arm64", "--target", "windows/amd64", ) @@ -433,7 +437,7 @@ func testWithoutSpecificBuilderRequirement( assertImage.CanBePulledFromRegistry(packageName) assertions.NewOutputAssertionManager(t, output).ReportsSuccessfulIndexPushed(packageName) - h.AssertRemoteImageIndex(t, packageName, types.OCIImageIndex, 2) + h.AssertRemoteImageIndex(t, packageName, types.OCIImageIndex, 3) }) }) }) @@ -472,7 +476,7 @@ func testWithoutSpecificBuilderRequirement( assertImage.CanBePulledFromRegistry(packageName) assertions.NewOutputAssertionManager(t, output).ReportsSuccessfulIndexPushed(packageName) - h.AssertRemoteImageIndex(t, packageName, types.OCIImageIndex, 2) + h.AssertRemoteImageIndex(t, packageName, types.OCIImageIndex, 3) }) }) }) @@ -3348,11 +3352,12 @@ include = [ "*.jar", "media/mountain.jpg", "/media/person.png", ] "--path", path, "--publish", "--target", "linux/amd64", + "--target", "linux/arm64", "--target", "windows/amd64", ) assertions.NewOutputAssertionManager(t, output).ReportsPackagePublished(multiArchBuildpackPackage) assertions.NewOutputAssertionManager(t, output).ReportsSuccessfulIndexPushed(multiArchBuildpackPackage) - h.AssertRemoteImageIndex(t, multiArchBuildpackPackage, types.OCIImageIndex, 2) + h.AssertRemoteImageIndex(t, multiArchBuildpackPackage, types.OCIImageIndex, 3) // runImage and buildImage are saved in the daemon, for this test we want them to be available in a registry remoteRunImage = registryConfig.RepoName(runImage + h.RandString(8)) @@ -3404,6 +3409,7 @@ include = [ "*.jar", "media/mountain.jpg", "/media/person.png", ] "--config", builderTomlPath, "--publish", "--target", "linux/amd64", + "--target", "linux/arm64", "--target", "windows/amd64", ) @@ -3413,7 +3419,7 @@ include = [ "*.jar", "media/mountain.jpg", "/media/person.png", ] assertImage.CanBePulledFromRegistry(builderName) assertions.NewOutputAssertionManager(t, output).ReportsSuccessfulIndexPushed(builderName) - h.AssertRemoteImageIndex(t, builderName, types.OCIImageIndex, 2) + h.AssertRemoteImageIndex(t, builderName, types.OCIImageIndex, 3) }) }) diff --git a/acceptance/testdata/mock_buildpacks/multi-platform-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/multi-platform-buildpack/buildpack.toml index e00f93e2de..c3ec65adf2 100644 --- a/acceptance/testdata/mock_buildpacks/multi-platform-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/multi-platform-buildpack/buildpack.toml @@ -9,6 +9,10 @@ api = "0.10" os = "linux" arch = "amd64" +[[targets]] +os = "linux" +arch = "arm64" + [[targets]] os = "windows" arch = "amd64"