From 0c95caea30e7647528e4bf69721ac5cf2da43755 Mon Sep 17 00:00:00 2001 From: simontesar Date: Fri, 25 Sep 2026 09:22:02 +0300 Subject: [PATCH 1/5] doc: update BYOBMC --- README.md | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 26bc323..d6f96c2 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,9 @@ model: "Standard PC (Q35 + ICH9, 2009)" firmwareVersion: "1.0.0" powerState: "On" biosVersion: "1.0.0" -biosSettingNoRebootValue: "+1-555-0100" +biosSettingNoRebootKey: "AssetTag" +biosSettingNoRebootValue: "compat-test-06" biosSettingRebootValue: "Bios" -bootOrder: ["Hdd", "Pxe", "Cd"] bmcSettingKey: "EmailAlert.1.Address" bmcSettingValue: "alerts@example.com" ``` @@ -46,5 +46,93 @@ bmcSettingValue: "alerts@example.com" Adjust the credentials and expectations to your respective values and point the tests to it: ```bash -make test/02-discovery VALUES=/path/to/new/file.yaml +make ASSERT_TIMEOUT=2m VALUES=/path/to/new/file.yaml test/01-bmc-registration ``` + +You will probably encounter an error like: +```shell +chainsaw test --values /home/user/src/metal-operator-test-framework/values-t160.yaml --parallel 1 --assert-timeout 2m tests/01-bmc-registration +Version: 0.2.15 +Loading default configuration... +- Using test file: chainsaw-test +- TestDirs [tests/01-bmc-registration] +- Quiet false +- SkipDelete false +- FailFast false +- Namespace '' +- FastNamespaceDeletion false +- FullName false +- IncludeTestRegex '' +- ExcludeTestRegex '' +- ApplyTimeout 5s +- AssertTimeout 2m0s +- CleanupTimeout 30s +- DeleteTimeout 15s +- ErrorTimeout 30s +- ExecTimeout 5s +- DeletionPropagationPolicy Background +- Parallel 1 +- Values [/home/user/src/metal-operator-test-framework/values-t160.yaml] +- Template true +- NoCluster false +- PauseOnFailure false +Loading tests... +- 01-bmc-registration (tests/01-bmc-registration) +Loading values... +Running tests... +=== RUN chainsaw +=== PAUSE chainsaw +=== CONT chainsaw +=== RUN chainsaw/01-bmc-registration + | 06:44:56 | 01-bmc-registration | @chainsaw | CREATE | OK | v1/Namespace @ chainsaw-elegant-puma + | 06:44:56 | 01-bmc-registration | register-bmc | TRY | BEGIN | + | 06:44:56 | 01-bmc-registration | register-bmc | APPLY | RUN | metal.ironcore.dev/v1alpha1/BMCSecret @ compatibility-chainsaw-elegant-puma + | 06:44:56 | 01-bmc-registration | register-bmc | CREATE | OK | metal.ironcore.dev/v1alpha1/BMCSecret @ compatibility-chainsaw-elegant-puma + | 06:44:56 | 01-bmc-registration | register-bmc | APPLY | DONE | metal.ironcore.dev/v1alpha1/BMCSecret @ compatibility-chainsaw-elegant-puma + | 06:44:56 | 01-bmc-registration | register-bmc | APPLY | RUN | metal.ironcore.dev/v1alpha1/BMC @ compatibility-chainsaw-elegant-puma + | 06:44:56 | 01-bmc-registration | register-bmc | CREATE | OK | metal.ironcore.dev/v1alpha1/BMC @ compatibility-chainsaw-elegant-puma + | 06:44:56 | 01-bmc-registration | register-bmc | APPLY | DONE | metal.ironcore.dev/v1alpha1/BMC @ compatibility-chainsaw-elegant-puma + | 06:44:56 | 01-bmc-registration | register-bmc | TRY | END | + | 06:44:56 | 01-bmc-registration | assert-bmc-enabled | TRY | BEGIN | + | 06:44:56 | 01-bmc-registration | assert-bmc-enabled | ASSERT | RUN | metal.ironcore.dev/v1alpha1/BMC @ compatibility-chainsaw-elegant-puma + | 06:46:56 | 01-bmc-registration | assert-bmc-enabled | ASSERT | ERROR | metal.ironcore.dev/v1alpha1/BMC @ compatibility-chainsaw-elegant-puma + === ERROR + ------------------------------------------------------------------- + metal.ironcore.dev/v1alpha1/BMC/compatibility-chainsaw-elegant-puma + ------------------------------------------------------------------- + * status.firmwareVersion: Invalid value: "7.30.10.50": Expected value: "1.0.0" + * status.model: Invalid value: "16G Monolithic": Expected value: "Standard PC (Q35 + ICH9, 2009)" + + --- expected + +++ actual + @@ -3,8 +3,8 @@ + metadata: + name: compatibility-chainsaw-elegant-puma + status: + - firmwareVersion: 1.0.0 + - model: Standard PC (Q35 + ICH9, 2009) + + firmwareVersion: 7.30.10.50 + + model: 16G Monolithic + powerState: "On" + state: Enabled + | 06:46:56 | 01-bmc-registration | assert-bmc-enabled | TRY | END | + | 06:46:56 | 01-bmc-registration | register-bmc | CLEANUP | BEGIN | + | 06:46:56 | 01-bmc-registration | register-bmc | DELETE | OK | metal.ironcore.dev/v1alpha1/BMC @ compatibility-chainsaw-elegant-puma + | 06:46:57 | 01-bmc-registration | register-bmc | DELETE | OK | metal.ironcore.dev/v1alpha1/BMCSecret @ compatibility-chainsaw-elegant-puma + | 06:46:57 | 01-bmc-registration | register-bmc | CLEANUP | END | + | 06:46:57 | 01-bmc-registration | @chainsaw | CLEANUP | BEGIN | + | 06:46:57 | 01-bmc-registration | @chainsaw | DELETE | OK | v1/Namespace @ chainsaw-elegant-puma + | 06:47:02 | 01-bmc-registration | @chainsaw | CLEANUP | END | +--- FAIL: chainsaw (125.32s) + --- FAIL: chainsaw/01-bmc-registration (125.32s) +FAIL +Tests Summary... +- Passed tests 0 +- Failed tests 1 +- Skipped tests 0 +Done with failures. +Error: some tests failed +make: *** [Makefile:59: test/01-bmc-registration] Error 1 +``` + +A mismatch like this means the expectations in your `VALUES` file need to be adjusted to reality. From 9a5db2092ff5c67fb8660c987966dafa629ce986 Mon Sep 17 00:00:00 2001 From: simontesar Date: Fri, 25 Sep 2026 09:33:41 +0300 Subject: [PATCH 2/5] fix: remove some explicit timeouts --- tests/06-biossettings-noreboot/chainsaw-test.yaml | 1 - tests/07-biossettings-reboot/chainsaw-test.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/tests/06-biossettings-noreboot/chainsaw-test.yaml b/tests/06-biossettings-noreboot/chainsaw-test.yaml index 73b93ad..c598283 100644 --- a/tests/06-biossettings-noreboot/chainsaw-test.yaml +++ b/tests/06-biossettings-noreboot/chainsaw-test.yaml @@ -48,7 +48,6 @@ spec: - name: assert-biossettings-applied try: - assert: - timeout: 10m resource: apiVersion: metal.ironcore.dev/v1alpha1 kind: BIOSSettings diff --git a/tests/07-biossettings-reboot/chainsaw-test.yaml b/tests/07-biossettings-reboot/chainsaw-test.yaml index 6568c22..ced855a 100644 --- a/tests/07-biossettings-reboot/chainsaw-test.yaml +++ b/tests/07-biossettings-reboot/chainsaw-test.yaml @@ -38,7 +38,6 @@ spec: - name: assert-biossettings-applied try: - assert: - timeout: 30m resource: apiVersion: metal.ironcore.dev/v1alpha1 kind: BIOSSettings From 41739e48f688b64c39823ffb327b55ca64941472 Mon Sep 17 00:00:00 2001 From: simontesar Date: Fri, 25 Sep 2026 09:33:55 +0300 Subject: [PATCH 3/5] refactor: remove 'absent' pattern in favour of null --- tests/06-biossettings-noreboot/chainsaw-test.yaml | 2 +- tests/10-bmcversion/chainsaw-test.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/06-biossettings-noreboot/chainsaw-test.yaml b/tests/06-biossettings-noreboot/chainsaw-test.yaml index c598283..4d5fbb5 100644 --- a/tests/06-biossettings-noreboot/chainsaw-test.yaml +++ b/tests/06-biossettings-noreboot/chainsaw-test.yaml @@ -65,4 +65,4 @@ spec: metadata: name: (join('-', ['compatibility', $namespace, 'noreboot'])) spec: - (serverMaintenanceRef || 'absent'): 'absent' + (serverMaintenanceRef == null): true diff --git a/tests/10-bmcversion/chainsaw-test.yaml b/tests/10-bmcversion/chainsaw-test.yaml index 0ecfd70..0a3a0bb 100644 --- a/tests/10-bmcversion/chainsaw-test.yaml +++ b/tests/10-bmcversion/chainsaw-test.yaml @@ -72,10 +72,10 @@ spec: metadata: name: (join('-', [$bmcName, 'bmc'])) spec: - (serverMaintenanceRefs || 'absent'): 'absent' + (serverMaintenanceRefs == null): true status: - (upgradeTask || 'absent'): 'absent' - (conditions || 'absent'): 'absent' + (upgradeTask == null): true + (conditions == null): true - assert: resource: apiVersion: metal.ironcore.dev/v1alpha1 @@ -83,7 +83,7 @@ spec: metadata: name: (join('-', [$bmcName, 'system-0'])) spec: - (serverMaintenanceRef || 'absent'): 'absent' + (serverMaintenanceRef == null): true status: state: Available - assert: From a79842379179b4d600410b56aa7dd5b8d41a39a5 Mon Sep 17 00:00:00 2001 From: simontesar Date: Mon, 21 Sep 2026 09:06:18 +0300 Subject: [PATCH 4/5] feat: 06: parameterise biossetting to test --- tests/06-biossettings-noreboot/biossettings-noreboot.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/06-biossettings-noreboot/biossettings-noreboot.yaml b/tests/06-biossettings-noreboot/biossettings-noreboot.yaml index fe1ce60..5dfeb57 100644 --- a/tests/06-biossettings-noreboot/biossettings-noreboot.yaml +++ b/tests/06-biossettings-noreboot/biossettings-noreboot.yaml @@ -9,5 +9,4 @@ spec: settingsFlow: - name: admin-phone priority: 1 - settings: - AdminPhone: ($values.biosSettingNoRebootValue) + settings: (from_items([[($values.biosSettingNoRebootKey), ($values.biosSettingNoRebootValue)]])) From 0f086b0ed1c9988fe601512f6e5c4d595a8a05cf Mon Sep 17 00:00:00 2001 From: simontesar Date: Fri, 25 Sep 2026 11:47:26 +0300 Subject: [PATCH 5/5] refactor: remove 'absent' pattern in favour of null --- tests/07-biossettings-reboot/chainsaw-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/07-biossettings-reboot/chainsaw-test.yaml b/tests/07-biossettings-reboot/chainsaw-test.yaml index ced855a..5a0bbd5 100644 --- a/tests/07-biossettings-reboot/chainsaw-test.yaml +++ b/tests/07-biossettings-reboot/chainsaw-test.yaml @@ -55,6 +55,6 @@ spec: metadata: name: (join('-', ['compatibility', $namespace, 'system-0'])) spec: - (serverMaintenanceRef || 'absent'): 'absent' + (serverMaintenanceRef == null): true status: state: Available