File tree Expand file tree Collapse file tree 4 files changed +19
-4
lines changed
Expand file tree Collapse file tree 4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,15 @@ def x86_64_version():
4545 )
4646
4747
48- def cpu_arch ():
48+ def cpu_arch (migration_system = False ):
4949 """Function for CPU architecture related checks"""
50+ if migration_system :
51+ # This check must not be called inside of the
52+ # migration system live iso or container image.
53+ # It will only be useful on the system to migrate
54+ # at install time of the Migration package or on
55+ # manual user invocation of suse-migration-pre-checks
56+ # prior the actual migration.
57+ return
58+
5059 x86_64_version ()
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ def main():
9292 log .info ('Checking harmful migration conditions' )
9393
9494 log .info ('--> Checking system architecture version...' )
95- check_cpu_arch .cpu_arch ()
95+ check_cpu_arch .cpu_arch (migration_system = migration_system_mode )
9696
9797 log .info ('--> Checking for local private repos...' )
9898 check_repos .remote_repos (migration_system = migration_system_mode )
@@ -117,7 +117,7 @@ def main():
117117 log .info ('Done' )
118118
119119 log .info ('--> Checking high availability extension...' )
120- check_ha .check_ha ()
120+ check_ha .check_ha (migration_system = migration_system_mode )
121121 log .info ('Done' )
122122
123123 log .info ('--> Checking wicked to NetworkManager migration...' )
Original file line number Diff line number Diff line change @@ -100,7 +100,9 @@ def perform(self):
100100 try :
101101 shutil .copy (cert_file , trust_anchor )
102102 except FileNotFoundError as issue :
103- self .log .warning ('Import of {} failed with {}' .format (cert_file , issue ))
103+ self .log .warning (
104+ 'Import of {} failed with {}' .format (cert_file , issue )
105+ )
104106 self .log .info ('Update certificate pool' )
105107 Command .run (['update-ca-certificates' ])
106108
Original file line number Diff line number Diff line change @@ -948,6 +948,10 @@ def test_check_x86_64_v2(
948948 assert 'SLE16 requires x86_64_v2 at minimum' not in self ._caplog .text
949949 mock_Command_run .assert_called_once_with (['zypper' , 'system-architecture' ])
950950
951+ mock_Command_run .reset_mock ()
952+ check_cpu_arch .cpu_arch (True )
953+ mock_Command_run .assert_not_called ()
954+
951955 @patch ('suse_migration_services.command.Command.run' )
952956 @patch ('suse_migration_services.migration_target.MigrationTarget.get_migration_target' )
953957 def test_check_x86_64_v1 (
You can’t perform that action at this time.
0 commit comments