From 7e8994e1b99f39d59e016cc09246bd90410253d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Thu, 20 Aug 2026 23:37:17 -0300 Subject: [PATCH] test(getinstdisk): pin the single script layout Assert that the RHEL 10 copy is gone, that the RHEL 10 installer includes the common script, and that the common script keeps the VROC fallback, the Xen fallback and the guarded failure log. --- xCAT-test/unit/getinstdisk_selection.t | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xCAT-test/unit/getinstdisk_selection.t b/xCAT-test/unit/getinstdisk_selection.t index 2beda18a7..cb4dfa55d 100644 --- a/xCAT-test/unit/getinstdisk_selection.t +++ b/xCAT-test/unit/getinstdisk_selection.t @@ -130,4 +130,17 @@ selects( '/dev/nvme0n1', 'an NVMe device is selected from the last group', # No usable disk falls back to the documented default. selects( '/dev/sda', 'no disks fall back to the default' ); +# Every installer includes the one script, which carries the fallbacks and the +# logging that the separate RHEL 10 copy used to hold on its own. +my $common = slurp( $scripts[0] ); +ok( !-e File::Spec->catfile( $script_dir, 'getinstdisk.rhels10' ), + 'the RHEL 10 copy of the script is gone' ); +like( slurp( File::Spec->catfile( $script_dir, 'pre.rhels10' ) ), + qr{/share/xcat/install/scripts/getinstdisk#}, + 'the RHEL 10 installer includes the common script' ); +like( $common, qr{-b /dev/md/Volume0_0}, 'the common script keeps the VROC fallback' ); +like( $common, qr{-b "/dev/xvda"}, 'the common script carries the Xen fallback' ); +like( $common, qr{command -v msgutil_r [^\n]*\n\s*msgutil_r }, + 'the failure log is guarded, because one installer does not define it' ); + done_testing();