diff --git a/tests/test.bats b/tests/test.bats index 09afba2..1eb2b6c 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -36,6 +36,8 @@ setup() { assert_success run ddev start -y assert_success + + export USE_CUSTOM_NODE=false } health_checks() { @@ -70,6 +72,12 @@ health_checks() { run ddev exec python -c "import ssl; print('SSL:', ssl.OPENSSL_VERSION)" assert_success assert_output "('SSL:', 'OpenSSL 1.1.1d 10 Sep 2019')" + + if [ "${USE_CUSTOM_NODE:-}" = "true" ]; then + run ddev exec node -v + assert_success + assert_output --regexp '^v18\.[0-9]+\.[0-9]+$' + fi } teardown() { @@ -94,6 +102,21 @@ teardown() { health_checks } +@test "install with node v18" { + set -eu -o pipefail + + export USE_CUSTOM_NODE=true + run ddev config --nodejs-version=v18 + assert_success + + echo "# ddev add-on get ${DIR} with project ${PROJNAME} in $(pwd)" >&3 + run ddev add-on get "${DIR}" + assert_success + run ddev restart -y + assert_success + health_checks +} + # bats test_tags=release @test "install from release" { set -eu -o pipefail diff --git a/web-build/Dockerfile.python2 b/web-build/Dockerfile.python2 index 2aabf53..df98cc4 100644 --- a/web-build/Dockerfile.python2 +++ b/web-build/Dockerfile.python2 @@ -2,16 +2,20 @@ COPY --from=python:2.7-slim /usr/local /usr/local COPY --from=python:2.7-slim /usr/lib /tmp/python2-libs ARG TARGETARCH -RUN if [ "$TARGETARCH" = "amd64" ]; then \ - LIB_ARCH="x86_64-linux-gnu"; \ - elif [ "$TARGETARCH" = "arm64" ]; then \ - LIB_ARCH="aarch64-linux-gnu"; \ - else \ - echo "Unsupported architecture: $TARGETARCH"; exit 1; \ - fi && \ - echo "Detected architecture: $TARGETARCH ($LIB_ARCH)" && \ - mkdir -p /usr/lib/$LIB_ARCH && \ - cp /tmp/python2-libs/*/libssl.so.1.1 /usr/lib/$LIB_ARCH/ && \ - cp /tmp/python2-libs/*/libcrypto.so.1.1 /usr/lib/$LIB_ARCH/ && \ - rm -rf /tmp/python2-libs && \ - ldconfig +RUN <&2 + exit 1 +fi +mkdir -p /usr/lib/$LIB_ARCH +cp /tmp/python2-libs/*/libssl.so.1.1 /usr/lib/$LIB_ARCH/ +cp /tmp/python2-libs/*/libcrypto.so.1.1 /usr/lib/$LIB_ARCH/ +rm -rf /tmp/python2-libs +ldconfig +EOF