2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-09-24 16:54:04 +00:00

test(genesis): isolate release consumers

This commit is contained in:
Vinícius Ferrão
2026-08-22 02:39:39 -03:00
parent 17bd87c53c
commit 4bfa7104d4
2 changed files with 9 additions and 5 deletions
+3 -2
View File
@@ -84,7 +84,8 @@ sub test_rpm_consumer {
write_file("$deploy_repo/xCAT-genesis-openembedded-stale.noarch.rpm", 'stale');
my $dependencies = "$tmp/rpm-dependencies";
make_path($dependencies);
my $scratch_repo_root = "$tmp/rpm-repo-root";
make_path($dependencies, $scratch_repo_root);
for my $name (qw(
ipmitool-xcat syslinux-xcat grub2-xcat xnba-undi
perl-IO-Stty perl-HTTP-Async perl-Net-HTTPS-NB
@@ -123,7 +124,7 @@ sub test_rpm_consumer {
my $status = run_capture(
$log,
$^X, $rpm_consumer,
'--repo-root', $repo_root,
'--repo-root', $scratch_repo_root,
'--output', $output,
'--target', $target,
'--run-id', 'consumer',
+6 -3
View File
@@ -303,8 +303,7 @@ sub exercise_packager {
'RPM uses the OpenEmbedded staging namespace');
is(run_capture($contents_log, 'rpm', '-qp', '--scripts', "$first/$relative"), 0,
'RPM script metadata can be read');
unlike(read_file($contents_log), qr/postinstall/i,
'RPM does not activate the staged image');
is(read_file($contents_log), '', 'RPM has no package scripts');
} else {
is(run_capture($contents_log, 'dpkg-deb', '-c', "$first/$relative"), 0,
'DEB payload can be listed');
@@ -315,7 +314,11 @@ sub exercise_packager {
make_path($control);
is(run_capture($contents_log, 'dpkg-deb', '-e', "$first/$relative", $control), 0,
'DEB control files can be extracted');
ok(!-e "$control/postinst", 'DEB does not activate the staged image');
opendir(my $control_dh, $control) or die $!;
my @control_files = sort grep { $_ ne '.' && $_ ne '..' } readdir($control_dh);
closedir($control_dh) or die $!;
is_deeply(\@control_files, [ qw(control md5sums) ],
'DEB has no maintainer scripts or triggers');
}
}