mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-27 04:42:17 +00:00
test(xcat-core): genesis_openembedded_duid.t fails on a second enabled unit
genesis_openembedded_duid.t fails in the unit suite. The xcat-genesis-network recipe enables xcat-genesis-duid.service and xcat-genesis-bootnic.service, and the test matched SYSTEMD_SERVICE against a list that holds the first unit alone. The test now reads SYSTEMD_SERVICE as a list and asserts that it holds xcat-genesis-duid.service. With that unit removed from the recipe the assertion fails, and with the recipe as it is the test passes. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -46,8 +46,11 @@ like( $service_contents, qr/^Type=oneshot$/m,
|
||||
'the client identifier is written once per boot' );
|
||||
|
||||
my $recipe_contents = contents_of("$NETWORK/xcat-genesis-network_1.0.bb");
|
||||
like( $recipe_contents, qr/^SYSTEMD_SERVICE:\$\{PN\} = "xcat-genesis-duid\.service"$/m,
|
||||
'the recipe enables the client identifier service' );
|
||||
# The recipe enables more than one unit, so the list is read as a list.
|
||||
my ($enabled) = $recipe_contents =~ /^SYSTEMD_SERVICE:\$\{PN\} = "([^"]*)"$/m;
|
||||
my %enabled = map { $_ => 1 } split( ' ', $enabled // '' );
|
||||
ok( $enabled{'xcat-genesis-duid.service'}, 'the recipe enables the client identifier service' )
|
||||
or diag( 'SYSTEMD_SERVICE: ' . ( $enabled // 'absent' ) );
|
||||
like( $recipe_contents, qr{\$\{D\}\$\{libexecdir\}/xcat/genesis-duid$}m,
|
||||
'the recipe installs the client identifier script' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user