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
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ RUN set -xe; \
mv /tmp/redis-cli /usr/bin; \
\
if [[ -n "${PYTHON_DEV}" ]]; then \
apk add --no-cache ripgrep jq; \
apk add --update --no-cache -t .wodby-python-build-deps \
build-base \
gcc \
Expand Down
14 changes: 14 additions & 0 deletions tests/development-tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
# Execute inside the image, bypassing application startup.
set -eu
[ -n "${PYTHON_DEV:-}" ] || exit 0
for tool in sh bash git curl rg jq nano ssh ssh-keygen; do
command -v "$tool" >/dev/null
done
test -x /usr/sbin/sshd
test "$(id -u)" -ne 0
test -w "$HOME"
identity=$(mktemp -d)
trap 'rm -rf "$identity"' EXIT
ssh-keygen -q -t ed25519 -N '' -f "$identity/host"
sudo -n /usr/sbin/sshd -t -f /dev/null -h "$identity/host"
3 changes: 3 additions & 0 deletions tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -e

# Validate the development tool contract before application integration tests.
docker run --rm --network none --entrypoint /bin/sh -v "$PWD/development-tools.sh:/tmp/development-tools.sh:ro" "${IMAGE}" /tmp/development-tools.sh

if [[ -n "${DEBUG}" ]]; then
set -x
fi
Expand Down
Loading