From d33532f9fac377693d0197be546aeea45ab6d7bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Fri, 2 Oct 2026 20:26:35 -0300 Subject: [PATCH] test(dhcp): leave the SAN node out of the Kea local-boot case The next change puts a node that boots from SAN in the local-boot class of Kea for a client that can attach the disk. The local-boot case checks the class with installed nodes only, which do not change. The test after the change covers the SAN node. --- xCAT-test/unit/dhcp_kea_plugin_intent.t | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/xCAT-test/unit/dhcp_kea_plugin_intent.t b/xCAT-test/unit/dhcp_kea_plugin_intent.t index 9948bc076..a55707330 100644 --- a/xCAT-test/unit/dhcp_kea_plugin_intent.t +++ b/xCAT-test/unit/dhcp_kea_plugin_intent.t @@ -1610,26 +1610,20 @@ foreach my $case (@invalid_mac_cases) { { booted => { netboot => 'xnba' }, bootpx => { netboot => 'pxe' }, - san01 => { netboot => 'xnba' }, } ), mac => DHCPKeaResTable->new( { booted => { mac => 'aa:bb:cc:dd:ee:05' }, bootpx => { mac => 'aa:bb:cc:dd:ee:06' }, - san01 => { mac => 'aa:bb:cc:dd:ee:07' }, } ), chain => DHCPKeaResTable->new( { booted => { currstate => 'boot' }, bootpx => { currstate => 'boot' }, - san01 => { currstate => 'iscsiboot' }, } ), - iscsi => DHCPKeaResTable->new( - { san01 => { server => '192.0.2.9', target => 'iqn.2024-01.test:san01', lun => 0 } } - ), ); no warnings 'redefine'; @@ -1650,7 +1644,7 @@ foreach my $case (@invalid_mac_cases) { }, }; - ok( xCAT_plugin::dhcp::kea_sync_node_client_classes( $config, [ 'booted', 'bootpx', 'san01' ] ), + ok( xCAT_plugin::dhcp::kea_sync_node_client_classes( $config, [ 'booted', 'bootpx' ] ), 'a node that is to boot from its disk changes the configuration' ); my @names = map { $_->{name} } @{ $config->{Dhcp4}{'client-classes'} }; @@ -1658,7 +1652,7 @@ foreach my $case (@invalid_mac_cases) { ok( $localboot, 'the installed nodes land in a class of their own' ); is( $localboot->{test}, 'pkt4.mac == 0xaabbccddee05 or pkt4.mac == 0xaabbccddee06', - 'both netboot methods are in it, and the iSCSI node is not: its root disk is on the network and gPXE is what attaches it' ); + 'both netboot methods are in it' ); is( $names[0], 'xcat-localboot', 'and it is defined first, because Kea rejects a member() test naming a class below it' );