Files
cozystack/packages/apps/foundationdb/tests/versions_test.yaml
T
Myasnikov Daniil 639ede20be fix(api): leave FoundationDB version checks in the chart
The chart still reads cluster.version to guard release-line changes,
so calling it ignored in an admission warning contradicts the render
error. Keep that decision in the chart, which can explain the version
mismatch, and limit removed-field warnings to inert values.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-10-23 19:14:17 +05:00

70 lines
2.0 KiB
YAML

suite: FoundationDB version map
templates:
- templates/cluster.yaml
release:
name: foundationdb-test
namespace: tenant-test
set:
_cluster:
cluster-domain: cozy.local
tests:
- it: defaults to 7.3.63
asserts:
- equal:
path: spec.version
value: "7.3.63"
- it: maps v7.4 to its tag
set:
version: v7.4
asserts:
- equal:
path: spec.version
value: "7.4.1"
- it: names the value and the versions on offer when version is null
set:
version: null
asserts:
- failedTemplate:
errorMessage: "FoundationDB version <nil> is not supported, allowed versions are [v7.3 v7.4]"
- it: renders a leftover cluster.version on the line version selects
set:
cluster:
version: "7.3.69"
asserts:
- equal:
path: spec.version
value: "7.3.63"
- it: refuses a leftover cluster.version on another line than version
set:
cluster:
version: "7.4.2"
asserts:
- failedTemplate:
errorMessage: "cluster.version 7.4.2 no longer selects the deployed version, and it is on a different release line than version v7.3. Set version to the line the cluster runs, upgrading the cluster first if that line is no longer offered, or remove cluster.version to move the cluster to 7.3.63."
- it: refuses a leftover cluster.version on a line the chart no longer offers
set:
cluster:
version: "7.1.67"
asserts:
- failedTemplate:
errorMessage: "cluster.version 7.1.67 no longer selects the deployed version, and it is on a different release line than version v7.3. Set version to the line the cluster runs, upgrading the cluster first if that line is no longer offered, or remove cluster.version to move the cluster to 7.3.63."
- it: renders once version picks the line cluster.version is on
set:
version: v7.4
cluster:
version: "7.4.2"
asserts:
- equal:
path: spec.version
value: "7.4.1"