mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-25 03:42:14 +00:00
test(template): the IPv6 profile does not replace the installer network
AutoYaST keeps the network the installer used unless keep_install_network says otherwise, and the sections _autoyast_network6 replaces set it true. The static interface in the generated section was therefore ignored. The test asserts the section sets keep_install_network to false. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,7 @@ no warnings 'once';
|
||||
|
||||
use File::Spec;
|
||||
use FindBin;
|
||||
use Test::More tests => 13;
|
||||
use Test::More tests => 14;
|
||||
|
||||
my $repo_root = File::Spec->catdir($FindBin::Bin, '..', '..');
|
||||
$ENV{XCATROOT} = File::Spec->catdir($repo_root, 'xCAT-server');
|
||||
@@ -54,6 +54,13 @@ like($xml, qr{<nameserver>\Q2001:db8:1::fe\E</nameserver>}, 'and the resolver is
|
||||
unlike($xml, qr{<dhcp_resolv}, 'no dhcp_resolv, which the Leap 15.6 schema refuses');
|
||||
like($xml, qr{<dhcp_hostname}, 'dhcp_hostname stays, which the schema does accept');
|
||||
|
||||
# AutoYaST keeps the network the installer used unless the profile says otherwise, and the
|
||||
# templates it replaces set keep_install_network to true. Without this the static interface
|
||||
# below is ignored: the installed node came up with ifcfg-eth0 BOOTPROTO=dhcp, no address but
|
||||
# a link-local one, and xcat.sh failed with "Network is unreachable".
|
||||
like($xml, qr{<keep_install_network config:type="boolean">false</keep_install_network>},
|
||||
'the profile network replaces the one the installer used');
|
||||
|
||||
# A node with no gateway still installs; it simply gets no default route.
|
||||
my $nogw = xCAT::Template::_autoyast_network6('cn6nogw');
|
||||
ok(defined($nogw), 'a node with no gateway still gets a section');
|
||||
|
||||
Reference in New Issue
Block a user