From 2e6c420d8a189a570f80032ee5e05e11b58f53da Mon Sep 17 00:00:00 2001 From: simontesar Date: Wed, 30 Sep 2026 06:24:57 +0300 Subject: [PATCH 1/3] feat: 07: eset biossettings to baseline value to avoid false success --- .../biossettings-reboot.yaml | 5 +- .../07-biossettings-reboot/chainsaw-test.yaml | 57 +++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/tests/07-biossettings-reboot/biossettings-reboot.yaml b/tests/07-biossettings-reboot/biossettings-reboot.yaml index 8a2104f..5e90f0d 100644 --- a/tests/07-biossettings-reboot/biossettings-reboot.yaml +++ b/tests/07-biossettings-reboot/biossettings-reboot.yaml @@ -8,7 +8,6 @@ spec: version: ($values.biosVersion) serverMaintenancePolicy: Enforced settingsFlow: - - name: boot-mode + - name: reboot priority: 1 - settings: - BootMode: ($values.biosSettingRebootValue) + settings: (from_items([[($values.biosSettingRebootKey), ($values.biosSettingRebootValue)]])) diff --git a/tests/07-biossettings-reboot/chainsaw-test.yaml b/tests/07-biossettings-reboot/chainsaw-test.yaml index 38238cb..b6a9f8d 100644 --- a/tests/07-biossettings-reboot/chainsaw-test.yaml +++ b/tests/07-biossettings-reboot/chainsaw-test.yaml @@ -31,6 +31,33 @@ spec: name: (join('-', ['compatibility', $namespace, 'system-0'])) status: state: Available +# Ensure that there is a baseline value set so that a run after an earlier +# successful run does not result in a no-op. The baseline reboots the server, +# so wait for it to become Available again before applying the target. + - name: prepare-baseline + try: + - apply: + file: biossettings-baseline.yaml + - assert: + resource: + apiVersion: system.metal.ironcore.dev/v1alpha1 + kind: BIOSSettings + metadata: + name: (join('-', ['compatibility', $namespace, 'baseline'])) + status: + state: Applied + - delete: + file: biossettings-baseline.yaml + - assert: + timeout: 15m + resource: + apiVersion: metal.ironcore.dev/v1alpha1 + kind: Server + metadata: + name: (join('-', ['compatibility', $namespace, 'system-0'])) + (annotations."metal.ironcore.dev/operation" == null): true + status: + state: Available - name: apply-biossettings try: - apply: @@ -45,6 +72,10 @@ spec: name: (join('-', ['compatibility', $namespace, 'reboot'])) status: state: Applied + (flowState[?name == 'reboot'] | [0]): + flowState: Applied + (conditions[?type == 'SettingsUpdateIssued'] | [0].status): "True" + (conditions[?type == 'RebootIssued'] | [0].status): "True" - name: assert-server-available-again try: - assert: @@ -57,3 +88,29 @@ spec: (annotations."metal.ironcore.dev/operation" == null): true status: state: Available + - name: restore-baseline + try: + - delete: + file: biossettings-reboot.yaml + - apply: + file: biossettings-baseline.yaml + - assert: + resource: + apiVersion: system.metal.ironcore.dev/v1alpha1 + kind: BIOSSettings + metadata: + name: (join('-', ['compatibility', $namespace, 'baseline'])) + status: + state: Applied + - delete: + file: biossettings-baseline.yaml + - assert: + timeout: 15m + resource: + apiVersion: metal.ironcore.dev/v1alpha1 + kind: Server + metadata: + name: (join('-', ['compatibility', $namespace, 'system-0'])) + (annotations."metal.ironcore.dev/operation" == null): true + status: + state: Available From 6217c0406f17952580e5246014b37a02414dad91 Mon Sep 17 00:00:00 2001 From: simontesar Date: Wed, 30 Sep 2026 06:25:21 +0300 Subject: [PATCH 2/3] doc: update example values --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0bb8012..415aa45 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,9 @@ biosVersion: "1.0.0" biosSettingNoRebootKey: "AssetTag" biosSettingNoRebootValue: "compat-test-06" biosSettingNoRebootBaselineValue: "compat-base" +biosSettingRebootKey: "BootMode" biosSettingRebootValue: "Bios" +biosSettingRebootBaselineValue: "Uefi" bmcSettingKey: "EmailAlert.1.Address" bmcSettingValue: "alerts@example.com" ``` From 6f44d467ca4f07a54f98cac49adc285daf73b652 Mon Sep 17 00:00:00 2001 From: simontesar Date: Wed, 30 Sep 2026 06:38:54 +0300 Subject: [PATCH 3/3] fix: 07: missing baseline resource file --- .../biossettings-baseline.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/07-biossettings-reboot/biossettings-baseline.yaml diff --git a/tests/07-biossettings-reboot/biossettings-baseline.yaml b/tests/07-biossettings-reboot/biossettings-baseline.yaml new file mode 100644 index 0000000..526c6b0 --- /dev/null +++ b/tests/07-biossettings-reboot/biossettings-baseline.yaml @@ -0,0 +1,13 @@ +apiVersion: system.metal.ironcore.dev/v1alpha1 +kind: BIOSSettings +metadata: + name: (join('-', ['compatibility', $namespace, 'baseline'])) +spec: + serverRef: + name: (join('-', ['compatibility', $namespace, 'system-0'])) + version: ($values.biosVersion) + serverMaintenancePolicy: Enforced + settingsFlow: + - name: reboot + priority: 1 + settings: (from_items([[($values.biosSettingRebootKey), ($values.biosSettingRebootBaselineValue)]]))