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:
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user