From b84cdb275b4d02482bc41eaae1edc193cb3c426c Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 2 Dec 2024 12:32:11 +1100 Subject: [PATCH] Updated test to build only `linux/amd64`. --- tests/bats/_helper.bash | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/bats/_helper.bash b/tests/bats/_helper.bash index bb19eec..4db6b46 100644 --- a/tests/bats/_helper.bash +++ b/tests/bats/_helper.bash @@ -50,16 +50,13 @@ setup() { fi # LCOV_EXCL_END - if [ "$(uname -m)" = "arm64" ]; then - export DOCKER_DEFAULT_PLATFORM=linux/amd64 - fi - - if [ -n "${DOCKER_DEFAULT_PLATFORM-}" ]; then - step "Using ${DOCKER_DEFAULT_PLATFORM} platform architecture." - fi + export DOCKER_DEFAULT_PLATFORM="${DOCKER_DEFAULT_PLATFORM:-linux/amd64}" + step "Using ${DOCKER_DEFAULT_PLATFORM} platform architecture." - # Due to a limitation in buildx, we are building for a single platform for these tests. + # Due to a limitation in buildx driver to build multi-platform images in some + # OSes (like MacOS), we are building for a single platform by default. export BUILDX_PLATFORMS="${DOCKER_DEFAULT_PLATFORM:-linux/amd64}" + step "Building for ${BUILDX_PLATFORMS} platforms." export DOCKER_BUILDKIT=1 export TEST_DOCKER_TAG_PREFIX="bats-test-"