Add integration tests based on testcontainers
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
**
|
||||
!Dockerfile
|
||||
!.dockerignore
|
||||
!runtime-check.sh
|
||||
!packages.lock
|
||||
@@ -0,0 +1,19 @@
|
||||
# linux/amd64 platform manifest for the official Alpine 3.22.7 image.
|
||||
FROM --platform=linux/amd64 alpine:3.22.7@sha256:dc92f017beea8e7f43263073d717f7bc011228c95d5312e440deb4d035bb4eec
|
||||
|
||||
LABEL org.opencontainers.image.title="WireGuard Admin Alpine integration fixture" \
|
||||
org.opencontainers.image.version="3.22.7" \
|
||||
org.opencontainers.image.base.name="docker.io/library/alpine:3.22.7" \
|
||||
org.opencontainers.image.base.digest="sha256:dc92f017beea8e7f43263073d717f7bc011228c95d5312e440deb4d035bb4eec"
|
||||
|
||||
COPY packages.lock /tmp/alpine-packages.lock
|
||||
RUN apk add --no-cache $(sed '/^#/d' /tmp/alpine-packages.lock) \
|
||||
&& mkdir -p /usr/local/share/wireguard-admin \
|
||||
&& install -m 0755 /tmp/alpine-packages.lock /usr/local/share/wireguard-admin/alpine-packages.lock \
|
||||
&& rm /tmp/alpine-packages.lock
|
||||
|
||||
COPY runtime-check.sh /usr/local/bin/wireguard-admin-alpine-check
|
||||
RUN chmod 0755 /usr/local/bin/wireguard-admin-alpine-check \
|
||||
&& /usr/local/bin/wireguard-admin-alpine-check
|
||||
|
||||
CMD ["/bin/sh"]
|
||||
@@ -0,0 +1,37 @@
|
||||
# Complete installed package closure from the selected-daemon Alpine 3.22.7
|
||||
# linux/amd64 image build on 2026-10-22. Dockerfile treats every entry as an
|
||||
# exact apk constraint. Rebuilds fail if this repository no longer serves the
|
||||
# recorded versions rather than silently choosing a different closure.
|
||||
alpine-baselayout=3.7.0-r0
|
||||
alpine-baselayout-data=3.7.0-r0
|
||||
alpine-keys=2.5-r0
|
||||
alpine-release=3.22.7-r0
|
||||
apk-tools=2.14.12-r0
|
||||
bash=5.2.37-r0
|
||||
busybox=1.37.0-r20
|
||||
busybox-binsh=1.37.0-r20
|
||||
ca-certificates-bundle=20261020-r0
|
||||
iproute2=6.15.0-r0
|
||||
iproute2-minimal=6.15.0-r0
|
||||
iproute2-ss=6.15.0-r0
|
||||
iproute2-tc=6.15.0-r0
|
||||
libapk2=2.14.12-r0
|
||||
libcap2=2.78-r0
|
||||
libcrypto3=3.5.9-r0
|
||||
libelf=0.193-r0
|
||||
libmnl=1.0.5-r2
|
||||
libncursesw=6.5_p20250503-r0
|
||||
libssl3=3.5.9-r0
|
||||
libxtables=1.8.11-r1
|
||||
musl=1.2.5-r13
|
||||
musl-utils=1.2.5-r13
|
||||
ncurses-terminfo-base=6.5_p20250503-r0
|
||||
openresolv=3.14.1-r0
|
||||
readline=8.2.13-r1
|
||||
scanelf=1.3.8-r1
|
||||
ssl_client=1.37.0-r20
|
||||
wireguard-tools=1.0.20250521-r0
|
||||
wireguard-tools-wg=1.0.20250521-r0
|
||||
wireguard-tools-wg-quick=1.0.20250521-r0
|
||||
zlib=1.3.2-r1
|
||||
zstd-libs=1.5.7-r0
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
command -v wg >/dev/null
|
||||
command -v ip >/dev/null
|
||||
command -v busybox >/dev/null
|
||||
wg --version >/dev/null
|
||||
ip -Version >/dev/null
|
||||
ip link show lo >/dev/null
|
||||
|
||||
if [ "${1:-}" = "--driver" ]; then
|
||||
shift
|
||||
[ "$#" -eq 1 ]
|
||||
[ -x "$1" ]
|
||||
# M8.4 provides this ignored cfg(test) entry point. Keep the selection
|
||||
# exact so no other ignored test can run in the fixture image.
|
||||
"$1" --ignored --exact container_driver::alpine_readiness --test-threads=1
|
||||
elif [ "$#" -ne 0 ]; then
|
||||
echo "usage: wireguard-admin-alpine-check [--driver PATH]" >&2
|
||||
exit 2
|
||||
fi
|
||||
Reference in New Issue
Block a user