Group kind tests by owning component

This commit is contained in:
ms2k 2026-07-19 18:40:09 +09:00
commit ffa65018ed
2 changed files with 115 additions and 115 deletions

View file

@ -0,0 +1,38 @@
apiVersion: batch/v1
kind: Job
metadata:
name: @@JOB_NAME@@
namespace: remora-testbed
spec:
backoffLimit: 0
activeDeadlineSeconds: 3600
template:
metadata:
labels:
app.kubernetes.io/name: remora-qualification
spec:
restartPolicy: Never
automountServiceAccountToken: false
enableServiceLinks: false
dnsPolicy: None
dnsConfig:
nameservers: [10.96.0.53]
searches: [remora-testbed.svc.cluster.local, svc.cluster.local, cluster.local]
options:
- {name: ndots, value: "5"}
containers:
- name: tests
image: @@TEST_IMAGE@@
imagePullPolicy: Never
envFrom:
- configMapRef:
name: @@PROFILE_NAME@@
volumeMounts:
- {name: profile, mountPath: /run/remora-fixture, readOnly: true}
resources:
requests: {cpu: "1", memory: 1Gi}
limits: {cpu: "4", memory: 12Gi}
volumes:
- name: profile
configMap:
name: @@PROFILE_NAME@@-file

56
tests/kind/qualification/run.sh Executable file
View file

@ -0,0 +1,56 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
source "$ROOT/tests/kind/fixture/lib.sh"
export REMORA_JOB_TIMEOUT_SECONDS=900
if [[ -n "${REMORA_FIXTURE_LANE:-}" ]] && [[ "${REMORA_QUALIFICATION_DIAGNOSTIC:-0}" != 1 ]]; then
printf 'REMORA_FIXTURE_LANE requires REMORA_QUALIFICATION_DIAGNOSTIC=1\n' >&2
exit 1
fi
USER_KUBECONFIG_BEFORE="$(user_kubeconfig_digest)"
SUCCEEDED=false
OWNS_FIXTURE=false
cleanup() {
local status=$?
trap - EXIT INT TERM
if [[ "${REMORA_TESTBED_RETAIN:-0}" = 1 ]] && [[ "$SUCCEEDED" != true ]]; then
printf 'retained kubeconfig: %s\n' "$KUBECONFIG_PATH"
printf 'retained context: %s\n' "$CONTEXT"
exit "$status"
fi
if [[ "$OWNS_FIXTURE" = true ]]; then
destroy_fixture || status=1
fi
if [[ "$(user_kubeconfig_digest)" != "$USER_KUBECONFIG_BEFORE" ]]; then
printf 'user kubeconfig changed unexpectedly\n' >&2
status=1
fi
exit "$status"
}
trap cleanup EXIT
trap 'exit 130' INT
trap 'exit 143' TERM
acquire_fixture_lock
REMORA_REAL_NERDCTL="$(command -v nerdctl)"
export REMORA_REAL_NERDCTL
"$REMORA_REAL_NERDCTL" --namespace default build \
--file "$ROOT/Dockerfile.test" \
--target kind-qualification-runner \
--tag remora-kind-qualification:local \
"$ROOT"
OWNS_FIXTURE=true
setup_fixture all
load_local_image remora-kind-qualification:local
run_job_matrix \
qualification \
"$TESTBED/qualification/job.yaml.in" \
remora-kind-qualification:local \
all
SUCCEEDED=true
printf 'full provider-matrix qualification Jobs passed\n'