2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-26 09:44:03 +00:00

test(netboot): cover the HTTP tftp alias

This commit is contained in:
Vinícius Ferrão
2026-08-26 18:44:20 -03:00
parent 7d3cd9bd6d
commit 4d0c96a78c
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -182,8 +182,8 @@ my $httpboot_port = xCAT::DHCP::BootPolicy->kea_httpboot_network_classes(
);
is(
$httpboot_port->[0]{'boot-file-name'},
'http://10.0.0.1:8080/srv/tftpboot/boot/grub2/grub2.riscv64',
'the HTTP boot URL follows the configured HTTP port and TFTP root'
'http://10.0.0.1:8080/tftpboot/boot/grub2/grub2.riscv64',
'the HTTP boot URL follows the configured HTTP port and web alias'
);
is_deeply(
+1 -1
View File
@@ -28,7 +28,7 @@ like(
);
like(
$rendered,
qr/client-architecture = 00:1c \{ #riscv64 uefi http boot\n\s+option vendor-class-identifier "HTTPClient";\n\s+filename "http:\/\/192\.0\.2\.10:8080\/srv\/tftp\/boot\/grub2\/grub2\.riscv64";/,
qr/client-architecture = 00:1c \{ #riscv64 uefi http boot\n\s+option vendor-class-identifier "HTTPClient";\n\s+filename "http:\/\/192\.0\.2\.10:8080\/tftpboot\/boot\/grub2\/grub2\.riscv64";/,
'the ISC policy renders the riscv64 HTTP boot branch with the subnet URL',
);
like(
+4 -4
View File
@@ -364,12 +364,12 @@ like(
like($grub_cfg, qr/^menuentry "xCAT Genesis riscv64" \{$/m, 'the menu entry names the architecture');
like(
$grub_cfg,
qr/^ linux \Q$xCAT::TableUtils::tftpdir\E\/xcat\/genesis\.kernel\.riscv64 xcatd=192\.168\.148\.10:3001 BOOTIF=\$net_default_mac$/m,
qr{^ linux /tftpboot/xcat/genesis\.kernel\.riscv64 xcatd=192\.168\.148\.10:3001 BOOTIF=\$net_default_mac$}m,
'the kernel line loads the Genesis kernel with the xcatd endpoint and the booting MAC',
);
like(
$grub_cfg,
qr/^ initrd \Q$xCAT::TableUtils::tftpdir\E\/xcat\/genesis\.fs\.riscv64\.gz$/m,
qr{^ initrd /tftpboot/xcat/genesis\.fs\.riscv64\.gz$}m,
'the initrd line loads the Genesis initramfs',
);
@@ -412,7 +412,7 @@ $responses = run_mknb('riscv64');
generation_succeeded($responses, 'riscv64 configuration generation succeeds with a serial console');
like(
read_config($grub_cfg_path),
qr/^ linux \Q$xCAT::TableUtils::tftpdir\E\/xcat\/genesis\.kernel\.riscv64 xcatd=192\.168\.148\.10:3002 console=tty0 console=ttyS0,115200n8r BOOTIF=\$net_default_mac$/m,
qr{^ linux /tftpboot/xcat/genesis\.kernel\.riscv64 xcatd=192\.168\.148\.10:3002 console=tty0 console=ttyS0,115200n8r BOOTIF=\$net_default_mac$}m,
'the serial console and a non-default xcatd port are carried into the kernel line',
);
%xCAT::TableUtils::site_extra = ();
@@ -441,7 +441,7 @@ $responses = run_mknb('riscv64');
generation_succeeded($responses, 'riscv64 configuration generation succeeds with an lzma initramfs');
like(
read_config($grub_cfg_path),
qr/^ initrd \Q$xCAT::TableUtils::tftpdir\E\/xcat\/genesis\.fs\.riscv64\.lzma$/m,
qr{^ initrd /tftpboot/xcat/genesis\.fs\.riscv64\.lzma$}m,
'the lzma Genesis initramfs is preferred over the gzip one',
);
unlink("$xCAT::TableUtils::tftpdir/xcat/genesis.fs.riscv64.lzma");