diff options
| author | Mark Klein <[email protected]> | 2021-01-15 00:23:55 +0000 |
|---|---|---|
| committer | Server Team CI Bot <[email protected]> | 2021-01-15 00:23:55 +0000 |
| commit | 756d3d8416ffe24cf34522d48f914598cecfd92e (patch) | |
| tree | c8a9028b9b7317aaf48839524b606d7b3bd87dc9 /tests/unittests/test_curthooks.py | |
| parent | b1312b5e19cf7b46028712866dcb2cbcd05ebfa6 (diff) | |
This adds arm64 compatibility for RH installations
The current behaviour for Redhat based installs assumes x86_64
arch for grub. This change queries the target arch and makes
decisions on packages based on that.
Diffstat (limited to 'tests/unittests/test_curthooks.py')
| -rw-r--r-- | tests/unittests/test_curthooks.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unittests/test_curthooks.py b/tests/unittests/test_curthooks.py index e5fead35..41670f71 100644 --- a/tests/unittests/test_curthooks.py +++ b/tests/unittests/test_curthooks.py @@ -504,6 +504,22 @@ class TestInstallMissingPkgs(CiTestCase): self.mock_install_packages.assert_called_with( expected_pkgs, target=target, osfamily=distro.DISTROS.redhat) + @patch.object(events, 'ReportEventStack') + def test_install_packages_on_uefi_arm64_centos(self, mock_events): + arch = 'arm64' + self.mock_arch.return_value = arch + self.mock_machine.return_value = 'arm64' + expected_pkgs = ['efibootmgr', 'grub2-efi-aa64', + 'grub2-efi-aa64-modules', 'shim-aa64'] + self.mock_uefi.return_value = True + self.mock_haspkg.return_value = True + target = "not-a-real-target" + cfg = {} + curthooks.install_missing_packages( + cfg, target=target, osfamily=distro.DISTROS.redhat) + self.mock_install_packages.assert_called_with( + expected_pkgs, target=target, osfamily=distro.DISTROS.redhat) + class TestSetupZipl(CiTestCase): |
