Skip to content
Merged
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
23 changes: 23 additions & 0 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ setup() {
assert_success
run ddev start -y
assert_success

export USE_CUSTOM_NODE=false
}

health_checks() {
Expand Down Expand Up @@ -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() {
Expand All @@ -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
Expand Down
30 changes: 17 additions & 13 deletions web-build/Dockerfile.python2
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
set -eu -o pipefail
chmod -f ugo+rwx /usr/local/bin
if [ "$TARGETARCH" = "amd64" ]; then
LIB_ARCH="x86_64-linux-gnu"
elif [ "$TARGETARCH" = "arm64" ]; then
LIB_ARCH="aarch64-linux-gnu"
else
echo "Unsupported architecture: $TARGETARCH" >&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