mirror of
https://github.com/cozystack/cozystack.git
synced 2026-10-30 00:27:04 +09:00
Nightly and the rc gate still booted the management nodes as QEMU
guests, the substrate the merge-gating lanes left behind. On it the
tenant Kubernetes suites have missed their node-join deadline on most
nights since 2026-10-02, each failure spends the whole deadline, and
the job reaches its timeout before the alphabetically later suites
run. Over the same days those suites passed on every PR run that
selected them, where the nodes are Talos containers and a tenant
worker sits one virtualization level shallower.
Both lanes now use the PR lanes' container substrate. Nightly's e2e no
longer waits for the nocloud disk, which it does not boot; the disk is
still built and published. A manual e2e-tag dispatch against a tag
that predates the container lane fails early and names the ref to
dispatch from instead.
DRBD, the replicated StorageClass and the Cozystack Talos node image
lose their last e2e coverage with this. The docs and comments that
pointed at nightly and the rc gate as that coverage now say so.
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
(cherry picked from commit da28ea7ee8)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
76 lines
3.4 KiB
Bash
76 lines
3.4 KiB
Bash
#!/usr/bin/env bats
|
|
# Unit coverage for the Package manifest emitted by hack/e2e-platform-packages.sh.
|
|
# This suite runs through hack/cozytest.sh, so it uses direct shell assertions
|
|
# rather than bats' run/status helpers.
|
|
|
|
@test "QEMU defaults keep the platform package and its VIP endpoint" {
|
|
manifest=$(hack/e2e-platform-packages.sh)
|
|
names=$(printf '%s\n' "$manifest" | yq -N '.metadata.name')
|
|
endpoint=$(printf '%s\n' "$manifest" | yq '.spec.components.platform.values.publishing.apiServerEndpoint')
|
|
|
|
if [ "$names" != "cozystack.cozystack-platform" ]; then
|
|
echo "default manifest unexpectedly carries other packages: $names" >&2
|
|
return 1
|
|
fi
|
|
if [ "$endpoint" != "https://192.168.123.10:6443" ]; then
|
|
echo "unexpected default API endpoint: $endpoint" >&2
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
@test "container mode forwards its endpoint and replaces no package" {
|
|
manifest=$(COZY_APISERVER_ENDPOINT=https://192.168.123.11:6443 COZY_LINSTOR_DRBD_ENABLED=false hack/e2e-platform-packages.sh)
|
|
names=$(printf '%s\n' "$manifest" | yq -N '.metadata.name')
|
|
endpoint=$(printf '%s\n' "$manifest" | yq '.spec.components.platform.values.publishing.apiServerEndpoint')
|
|
disabled=$(printf '%s\n' "$manifest" | yq '.spec.components.platform.values.bundles.disabledPackages')
|
|
|
|
if [ "$names" != "cozystack.cozystack-platform" ]; then
|
|
echo "container manifest has unexpected packages: $names" >&2
|
|
return 1
|
|
fi
|
|
if [ "$endpoint" != "https://192.168.123.11:6443" ]; then
|
|
echo "container API endpoint was not forwarded: $endpoint" >&2
|
|
return 1
|
|
fi
|
|
if [ "$disabled" != "null" ]; then
|
|
echo "container manifest disables platform packages: $disabled" >&2
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
@test "every e2e lane forwards the container-lane settings into the sandbox" {
|
|
make_command=$(make -n -C packages/core/testing SANDBOX_NAME=test COZY_APISERVER_ENDPOINT=https://192.168.123.11:6443 COZY_LINSTOR_DRBD_ENABLED=false install-cozystack)
|
|
|
|
if ! printf '%s\n' "$make_command" | grep -Fq -- '-e COZY_APISERVER_ENDPOINT="https://192.168.123.11:6443"'; then
|
|
echo "testing Makefile does not forward COZY_APISERVER_ENDPOINT" >&2
|
|
return 1
|
|
fi
|
|
if ! printf '%s\n' "$make_command" | grep -Fq -- '-e COZY_LINSTOR_DRBD_ENABLED="false"'; then
|
|
echo "testing Makefile does not forward COZY_LINSTOR_DRBD_ENABLED" >&2
|
|
return 1
|
|
fi
|
|
|
|
# Install and run must agree on the class: a mismatch fails deep inside a suite.
|
|
for wf in .github/workflows/pull-requests.yaml .github/workflows/nightly.yaml .github/workflows/e2e-tag.yaml; do
|
|
install='.jobs.e2e.steps[] | select(.name == "Install Cozystack into sandbox")'
|
|
tests='.jobs.e2e.steps[] | select(.name | test("^Run E2E tests"))'
|
|
endpoint_value=$(yq "$install | .env.COZY_APISERVER_ENDPOINT" "$wf")
|
|
if [ "$endpoint_value" != "https://192.168.123.11:6443" ]; then
|
|
echo "$wf: install does not set the node API endpoint: $endpoint_value" >&2
|
|
return 1
|
|
fi
|
|
if [ "$(yq "$install | .env.COZY_LINSTOR_DRBD_ENABLED" "$wf")" != "false" ]; then
|
|
echo "$wf: install does not set COZY_LINSTOR_DRBD_ENABLED=false" >&2
|
|
return 1
|
|
fi
|
|
if [ "$(yq "$install | .env.COZY_E2E_STORAGE_CLASS" "$wf")" != "local" ]; then
|
|
echo "$wf: install does not set COZY_E2E_STORAGE_CLASS=local" >&2
|
|
return 1
|
|
fi
|
|
if [ "$(yq "$tests | .env.COZY_E2E_STORAGE_CLASS" "$wf")" != "local" ]; then
|
|
echo "$wf: the suite run does not set COZY_E2E_STORAGE_CLASS=local" >&2
|
|
return 1
|
|
fi
|
|
done
|
|
}
|