diff --git a/scripts/irods/test/test_all_rules.py b/scripts/irods/test/test_all_rules.py index 9b04a40d74..c7ee9f0292 100644 --- a/scripts/irods/test/test_all_rules.py +++ b/scripts/irods/test/test_all_rules.py @@ -410,7 +410,7 @@ def test_writeLine_config_last_3477(self): irods_config.server_config['plugin_configuration']['rule_engines'] = orig irods_config.commit(irods_config.server_config, irods_config.server_config_path, make_backup=True) - IrodsController().start() + IrodsController().start(test_mode=True) @unittest.skip('Delete this line upon resolving #3957') @unittest.skipIf(plugin_name == 'irods_rule_engine_plugin-irods_rule_language', 'only applicable for python REP') @@ -460,7 +460,7 @@ def test_writeLine_config_first_3477(self): irods_config.server_config['plugin_configuration']['rule_engines'] = orig irods_config.commit(irods_config.server_config, irods_config.server_config_path, make_backup=True) - IrodsController().start() + IrodsController().start(test_mode=True) @unittest.skipUnless(plugin_name == 'irods_rule_engine_plugin-irods_rule_language', 'only applicable for irods_rule_language REP') @@ -1272,7 +1272,7 @@ def test_rename_local_zone__issue_5693(self): # Restart the server. This is done so that the delay server does not fill # the log with errors due having incorrect zone information. - IrodsController().restart() + IrodsController().restart(test_mode=True) # Update the rods session with the new zone information so that icommands succeed. with open(config.client_environment_path, 'r') as f: @@ -1293,7 +1293,7 @@ def test_rename_local_zone__issue_5693(self): finally: # Restart the server. This is done so that the delay server does not fill # the log file with errors due having incorrect zone information. - IrodsController().restart() + IrodsController().restart(test_mode=True) # Update the rods session with the original zone information so that icommands succeed. with open(config.client_environment_path, 'r') as f: diff --git a/scripts/irods/test/test_auth.py b/scripts/irods/test/test_auth.py index 0c13cc2b8c..12472239b7 100644 --- a/scripts/irods/test/test_auth.py +++ b/scripts/irods/test/test_auth.py @@ -88,7 +88,7 @@ def test_authentication_PAM_without_negotiation(self): self.auth_session.environment_file_contents.update(client_update) # server reboot to pick up new irodsEnv settings - IrodsController().start() + IrodsController().start(test_mode=True) # do the reauth self.auth_session.assert_icommand('iinit', 'STDOUT', 'Enter your current PAM password', @@ -105,7 +105,7 @@ def test_authentication_PAM_without_negotiation(self): os.unlink(filename) # server reboot to pick up new irodsEnv and server settings - IrodsController().restart() + IrodsController().restart(test_mode=True) @unittest.skipIf(test.settings.TOPOLOGY_FROM_RESOURCE_SERVER or test.settings.USE_SSL, 'Topo from resource or SSL') def test_authentication_PAM_with_server_params(self): @@ -118,7 +118,7 @@ def test_authentication_PAM_with_server_params(self): lib.execute_command(['openssl', 'req', '-batch', '-new', '-x509', '-key', server_key_path, '-out', chain_pem_path, '-days', '365']) lib.execute_command(['openssl', 'dhparam', '-2', '-out', dhparams_pem_path, str(numbits)]) - IrodsController().stop() + IrodsController().stop(test_mode=True) service_account_environment_file_path = os.path.join(os.path.expanduser('~'), '.irods', 'irods_environment.json') auth_session_env_backup = copy.deepcopy(self.auth_session.environment_file_contents) @@ -175,7 +175,7 @@ def acPreConnect(rule_args, callback, rei): with temporary_core_file() as core: core.add_rule(pep_map[self.plugin_name]) - IrodsController().start() + IrodsController().start(test_mode=True) # the test print(f'running iinit for PAM user [{self.auth_session.username}] [{self.auth_session.password}]') @@ -190,7 +190,7 @@ def acPreConnect(rule_args, callback, rei): if os.path.exists(filename): os.unlink(filename) - IrodsController().restart() + IrodsController().restart(test_mode=True) def test_iinit_repaving_2646(self): l = logging.getLogger(__name__) @@ -224,10 +224,10 @@ def test_denylist(self): } lib.update_json_file_from_dict(paths.server_config_path(), server_config_update) - IrodsController().start() + IrodsController().start(test_mode=True) self.user_sessions[0].assert_icommand( 'ils', 'STDERR_SINGLELINE', 'SYS_USER_NOT_ALLOWED_TO_CONN' ) self.user_sessions[1].assert_icommand( 'ils', 'STDOUT_SINGLELINE', '/home' ) - IrodsController().restart() + IrodsController().restart(test_mode=True) def test_allowlist(self): IrodsController().stop() @@ -247,10 +247,10 @@ def test_allowlist(self): } lib.update_json_file_from_dict(paths.server_config_path(), server_config_update) - IrodsController().start() + IrodsController().start(test_mode=True) self.user_sessions[0].assert_icommand( 'ils', 'STDOUT_SINGLELINE', '/home' ) self.user_sessions[1].assert_icommand( 'ils', 'STDERR_SINGLELINE', 'SYS_USER_NOT_ALLOWED_TO_CONN' ) - IrodsController().restart() + IrodsController().restart(test_mode=True) class test_iinit(session.make_sessions_mixin([('otherrods', 'rods')], []), unittest.TestCase): diff --git a/scripts/irods/test/test_iadmin.py b/scripts/irods/test/test_iadmin.py index ffa0b59eb1..d2f9c1e685 100644 --- a/scripts/irods/test/test_iadmin.py +++ b/scripts/irods/test/test_iadmin.py @@ -1273,7 +1273,7 @@ def acAclPolicy(rule_args, callback, rei): core.add_rule(pep_map[self.plugin_name]) # restart the server to reread the new core.re - IrodsController().restart() + IrodsController().restart(test_mode=True) self.admin.assert_icommand("ils", 'STDOUT_SINGLELINE', self.admin.zone_name) @@ -1295,7 +1295,7 @@ def test_server_config_environment_variables(self): irods_config.commit(server_config, irods_config.server_config_path) # bounce the server to get the new env variable - IrodsController().restart() + IrodsController().restart(test_mode=True) # look for the error "unable to read session variable $userNameClient." cmd_directory = os.path.join(irods_config.irods_directory, 'msiExecCmd_bin') @@ -1307,7 +1307,7 @@ def test_server_config_environment_variables(self): 'writeLine("stdout", "*out")\' null ruleExecOut'.format(os.path.basename(env_script.name)), 'STDOUT_SINGLELINE', the_value) os.unlink(env_script.name) - IrodsController().restart() + IrodsController().restart(test_mode=True) def test_set_resource_comment_to_emptystring_ticket_2434(self): mycomment = "notemptystring" @@ -1394,7 +1394,7 @@ def test_impostor_resource_debug_logging(self): } } lib.update_json_file_from_dict(server_config_filename, server_config_update) - IrodsController().restart() + IrodsController().restart(test_mode=True) name_of_bogus_resource = 'name_of_bogus_resource' name_of_missing_plugin = 'name_of_missing_plugin' @@ -1411,7 +1411,7 @@ def test_impostor_resource_debug_logging(self): start_index=initial_size_of_server_log)) self.admin.assert_icommand(['iadmin', 'rmresc', name_of_bogus_resource]) - IrodsController().restart() + IrodsController().restart(test_mode=True) @unittest.skipIf(True, "Activate once fixed issue#3387") def test_dlopen_failure_error_message(self): diff --git a/scripts/irods/test/test_icommands_file_operations.py b/scripts/irods/test/test_icommands_file_operations.py index b16662e0cf..1bf6727d99 100644 --- a/scripts/irods/test/test_icommands_file_operations.py +++ b/scripts/irods/test/test_icommands_file_operations.py @@ -73,7 +73,7 @@ def pep_resource_create_post(rule_args,callback,rei): initial_size_of_server_log = lib.get_file_size_by_path(paths.server_log_path()) with temporary_core_file() as core: core.add_rule(pep_map[self.plugin_name]) - IrodsController().start() + IrodsController().start(test_mode=True) with tempfile.NamedTemporaryFile(prefix='test_re_serialization__prep_13') as f: lib.make_file(f.name, 80, contents='arbitrary') self.admin.assert_icommand(['iput', f.name]) @@ -102,7 +102,7 @@ def pep_api_data_obj_put_post(rule_args,callback,rei): initial_size_of_server_log = lib.get_file_size_by_path(paths.server_log_path()) with temporary_core_file() as core: core.add_rule(pep_map[self.plugin_name]) - IrodsController().start() + IrodsController().start(test_mode=True) with tempfile.NamedTemporaryFile(prefix='test_re_serialization__prep_55') as f: lib.make_file(f.name, 80, contents='arbitrary') self.admin.assert_icommand(['iput', f.name]) @@ -253,7 +253,7 @@ def test_iput_r_with_kw(self): start_index=initial_size_of_server_log)) finally: - IrodsController().restart() + IrodsController().restart(test_mode=True) @unittest.skipIf(test.settings.TOPOLOGY_FROM_RESOURCE_SERVER, "Skip for topology testing from resource server") class Test_ICommands_File_Operations_2(resource_suite.ResourceBase, shared_functions, unittest.TestCase): @@ -679,7 +679,7 @@ def irods_server_stopped(): try: yield finally: - control.start() + control.start(test_mode=True) with irods_server_stopped(): self.admin.assert_icommand(['ils'], 'STDERR_SINGLELINE', 'Connection refused') diff --git a/scripts/irods/test/test_iphymv.py b/scripts/irods/test/test_iphymv.py index b53ce86106..d0a61dba94 100644 --- a/scripts/irods/test/test_iphymv.py +++ b/scripts/irods/test/test_iphymv.py @@ -486,7 +486,7 @@ def test_exit_code_when_connection_fails(self): self.assertEqual(2, rc) finally: - IrodsController().start() + IrodsController().start(test_mode=True) @unittest.skipIf(test.settings.TOPOLOGY_FROM_RESOURCE_SERVER, 'Delete on resolution of #5690') def test_exit_code_for_authentication_failure(self): diff --git a/scripts/irods/test/test_irodsctl.py b/scripts/irods/test/test_irodsctl.py index 861043f60c..93864d9102 100644 --- a/scripts/irods/test/test_irodsctl.py +++ b/scripts/irods/test/test_irodsctl.py @@ -25,7 +25,7 @@ def test_re_shm_cleanup(self): irodsctl_fullpath = os.path.join(IrodsConfig().irods_directory, 'irodsctl') assert_command([irodsctl_fullpath, 'stop', '-v'], 'STDOUT_SINGLELINE', 'Stopping iRODS server') assert not lib.re_shm_exists(), lib.re_shm_exists() - IrodsController().start() + IrodsController().start(test_mode=True) def test_configuration_schema_validation_from_file(self): with lib.file_backed_up(IrodsConfig().server_config_path) as server_config_filename: @@ -115,7 +115,7 @@ def test_agents_kept_alive_by_connected_clients_are_cleaned_up_after_failed_grac finally: # Restart the server. - IrodsController().restart() + IrodsController().restart(test_mode=True) # Set the replica to stale (it will be in the intermediate status - this is not a bug) and remove. admin_session.run_icommand( diff --git a/scripts/irods/test/test_log_levels.py b/scripts/irods/test/test_log_levels.py index 32a4fa6230..06aa094f1c 100644 --- a/scripts/irods/test/test_log_levels.py +++ b/scripts/irods/test/test_log_levels.py @@ -27,7 +27,7 @@ def test_log_sql__issue_3865(self): initial_log_size = lib.get_file_size_by_path(IrodsConfig().server_log_path) # Restart with spLogSql not set in the environment - IrodsController().restart() + IrodsController().restart(test_mode=True) # There should be no LOG_SQL lines in the log at this point. None. lib.delayAssert( @@ -46,10 +46,10 @@ def test_log_sql__issue_3865(self): env['spLogSql'] = '1' # Restart with spLogSql set in the environment - IrodsController(IrodsConfig(injected_environment=env)).restart() + IrodsController(IrodsConfig(injected_environment=env)).restart(test_mode=True) # Restart with spLogSql not set in the environment - IrodsController().restart() + IrodsController().restart(test_mode=True) # There should be more than 20 LOG_SQL lines in the log at this point. lib.delayAssert( diff --git a/scripts/irods/test/test_native_rule_engine_plugin.py b/scripts/irods/test/test_native_rule_engine_plugin.py index 7ba1ddd770..58111ed65e 100644 --- a/scripts/irods/test/test_native_rule_engine_plugin.py +++ b/scripts/irods/test/test_native_rule_engine_plugin.py @@ -519,13 +519,13 @@ def pep_network_agent_start_post(rule_args, callback, rei): f.write(new_server_config) # Bounce server to apply setting - irodsctl.restart() + irodsctl.restart(test_mode=True) # Actually run the test self.helper_test_pep(pep_map[self.plugin_name], "iput -f --metadata ATTR;VALUE;UNIT "+self.testfile) # Bounce server to get back original settings - irodsctl.restart() + irodsctl.restart(test_mode=True) def test_auth_pep(self): pep_map = { diff --git a/scripts/irods/test/test_pam_password_authentication.py b/scripts/irods/test/test_pam_password_authentication.py index 508d2a69ba..f1f89a3665 100644 --- a/scripts/irods/test/test_pam_password_authentication.py +++ b/scripts/irods/test/test_pam_password_authentication.py @@ -129,7 +129,7 @@ def do_test_invalid_password_time_configurations(self, _option_name): with temporary_core_file() as core: core.add_rule(test_configurations.get_pep_for_ssl(self.plugin_name)) - IrodsController().start() + IrodsController().start(test_mode=True) # Make sure the settings applied correctly... self.admin.assert_icommand( @@ -154,7 +154,7 @@ def do_test_invalid_password_time_configurations(self, _option_name): self.auth_session.environment_file_contents = auth_session_env_backup self.admin.environment_file_contents = admin_session_env_backup - IrodsController().restart() + IrodsController().restart(test_mode=True) self.admin.assert_icommand( ['iadmin', 'set_grid_configuration', self.configuration_namespace, _option_name, original_config]) @@ -197,7 +197,7 @@ def test_password_max_time_less_than_password_min_time_makes_ttl_constraints_uns with temporary_core_file() as core: core.add_rule(test_configurations.get_pep_for_ssl(self.plugin_name)) - IrodsController().start() + IrodsController().start(test_mode=True) # Make sure the settings applied correctly... self.admin.assert_icommand( @@ -253,14 +253,14 @@ def test_password_max_time_less_than_password_min_time_makes_ttl_constraints_uns self.auth_session.environment_file_contents = auth_session_env_backup self.admin.environment_file_contents = admin_session_env_backup - IrodsController().restart() + IrodsController().restart(test_mode=True) self.admin.assert_icommand( ['iadmin', 'set_grid_configuration', self.configuration_namespace, max_time_option_name, original_max_time]) self.admin.assert_icommand( ['iadmin', 'set_grid_configuration', self.configuration_namespace, min_time_option_name, original_min_time]) - IrodsController().restart() + IrodsController().restart(test_mode=True) def test_password_expires_appropriately_based_on_grid_configuration_value(self): import time @@ -296,7 +296,7 @@ def test_password_expires_appropriately_based_on_grid_configuration_value(self): with temporary_core_file() as core: core.add_rule(test_configurations.get_pep_for_ssl(self.plugin_name)) - IrodsController().start() + IrodsController().start(test_mode=True) # Make sure the settings applied correctly... self.admin.assert_icommand( @@ -341,7 +341,7 @@ def test_password_expires_appropriately_based_on_grid_configuration_value(self): self.auth_session.environment_file_contents = auth_session_env_backup self.admin.environment_file_contents = admin_session_env_backup - IrodsController().restart() + IrodsController().restart(test_mode=True) self.admin.assert_icommand( ['iadmin', 'set_grid_configuration', self.configuration_namespace, max_time_option_name, original_max_time]) @@ -400,7 +400,7 @@ def test_password_extend_lifetime_set_to_true_extends_other_authentications_past with temporary_core_file() as core: core.add_rule(test_configurations.get_pep_for_ssl(self.plugin_name)) - IrodsController().start() + IrodsController().start(test_mode=True) # Make sure the settings applied correctly... self.admin.assert_icommand( @@ -460,7 +460,7 @@ def test_password_extend_lifetime_set_to_true_extends_other_authentications_past self.auth_session.environment_file_contents = auth_session_env_backup self.admin.environment_file_contents = admin_session_env_backup - IrodsController().restart() + IrodsController().restart(test_mode=True) self.admin.assert_icommand( ['iadmin', 'set_grid_configuration', self.configuration_namespace, extend_lifetime_option_name, original_extend_lifetime]) @@ -519,7 +519,7 @@ def test_password_extend_lifetime_set_to_false_invalidates_other_authentications with temporary_core_file() as core: core.add_rule(test_configurations.get_pep_for_ssl(self.plugin_name)) - IrodsController().start() + IrodsController().start(test_mode=True) # Make sure the settings applied correctly... self.admin.assert_icommand( @@ -582,7 +582,7 @@ def test_password_extend_lifetime_set_to_false_invalidates_other_authentications self.auth_session.environment_file_contents = auth_session_env_backup self.admin.environment_file_contents = admin_session_env_backup - IrodsController().restart() + IrodsController().restart(test_mode=True) self.admin.assert_icommand( ['iadmin', 'set_grid_configuration', self.configuration_namespace, extend_lifetime_option_name, original_extend_lifetime]) @@ -624,7 +624,7 @@ def test_password_max_time_can_exceed_1209600__issue_3742_5096(self): with temporary_core_file() as core: core.add_rule(test_configurations.get_pep_for_ssl(self.plugin_name)) - IrodsController().start() + IrodsController().start(test_mode=True) # The test value is 2 hours more than the default in order to try a TTL value 1 greater and 1 less # than the configured password_max_time while still remaining above 1209600 to show that there is @@ -663,7 +663,7 @@ def test_password_max_time_can_exceed_1209600__issue_3742_5096(self): self.auth_session.environment_file_contents = auth_session_env_backup self.admin.environment_file_contents = admin_session_env_backup - IrodsController().restart() + IrodsController().restart(test_mode=True) self.admin.assert_icommand( ['iadmin', 'set_grid_configuration', self.configuration_namespace, max_time_option_name, original_max_time]) diff --git a/scripts/irods/test/test_prep_genquery_iterator.py b/scripts/irods/test/test_prep_genquery_iterator.py index ce2085e6ae..82920db6ee 100644 --- a/scripts/irods/test/test_prep_genquery_iterator.py +++ b/scripts/irods/test/test_prep_genquery_iterator.py @@ -349,7 +349,7 @@ def my_rule_256(rule_args, callback, rei): rule_args[0] = str(n) ''')) - IrodsController().start() + IrodsController().start(test_mode=True) rule_file = "" with generateRuleFile( names_list = self.to_unlink, **{'prefix':"test_mult256_"} ) as f: @@ -371,7 +371,7 @@ def main(rule_args,callback,rei): IrodsController().stop() - IrodsController().start() + IrodsController().start(test_mode=True) #=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-# @@ -444,7 +444,7 @@ def my_rule_256_nonnested(rule_args, callback, rei): rule_args[0] = str(L[0]) if len(L) == {Outer_Loop_Reps} and L == L[:1] * len(L) else "-1" '''.format(**locals()))) - IrodsController().start() + IrodsController().start(test_mode=True) rule_file = "" with generateRuleFile( names_list = self.to_unlink, **{'prefix':"test_mult256_nn_"} ) as f: @@ -466,7 +466,7 @@ def main(rule_args,callback,rei): IrodsController().stop() - IrodsController().start() + IrodsController().start(test_mode=True) #=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-# # Remove the next line when msiGetMoreRows always returns an accurate value for continueInx @@ -507,7 +507,7 @@ def my_rule_256_nested(rule_args, callback, rei): rule_args[0] = str(n) ''')) - IrodsController().start() + IrodsController().start(test_mode=True) rule_file = "" with generateRuleFile( names_list = self.to_unlink, **{'prefix':"test_mult256_n_"} ) as f: @@ -532,7 +532,7 @@ def main(rule_args,callback,rei): IrodsController().stop() - IrodsController().start() + IrodsController().start(test_mode=True) #=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-#=-=-=-=-=-# @@ -633,11 +633,11 @@ def attempt_to_fill_statement_table (rule_args, callback, rei): valid_count.append(n == 1) callback.writeLine("stdout", str( 1 if len( valid_count ) == {0} and all (valid_count) else 0) ) ''').format(outer_loop_reps , collection_to_query)) - IrodsController().start() + IrodsController().start(test_mode=True) run_irule = "irule attempt_to_fill_statement_table null ruleExecOut" self.admin.assert_icommand(run_irule, 'STDOUT_SINGLELINE', r'^1$', use_regex=True) IrodsController().stop() - IrodsController().start() + IrodsController().start(test_mode=True) @unittest.skipIf(plugin_name == 'irods_rule_engine_plugin-irods_rule_language', 'only applicable for python REP') def test_with_modified_rulebase_off_boundary(self): @@ -646,7 +646,7 @@ def test_with_modified_rulebase_off_boundary(self): IrodsController().stop() with lib.file_backed_up (self.server_config_path): self.boundary_with_size(512 + 7 * 8 * 9, self.modify_rulebase_and_tst, pre_start = True) - IrodsController().start() + IrodsController().start(test_mode=True) @unittest.skipIf(plugin_name == 'irods_rule_engine_plugin-irods_rule_language', 'only applicable for python REP') @@ -655,16 +655,16 @@ def test_with_modified_rulebase_on_boundary(self): if self.full_test: IrodsController().stop() with lib.file_backed_up (self.server_config_path): - #IrodsController().start() + #IrodsController().start(test_mode=True) self.boundary_with_size(512 + 7 * 8 * 9, self.modify_rulebase_and_tst, pre_start = True) #IrodsController().stop() # -- done internally by above call - IrodsController().start() + IrodsController().start(test_mode=True) def boundary_with_size(self, N, func, pre_start = False): if pre_start: - IrodsController().start() # -- for cases where Native REP was inserted to svr config + IrodsController().start(test_mode=True) # -- for cases where Native REP was inserted to svr config lib.create_directory_of_small_files(self.dir_for_coll,N) lib.execute_command ('tar -cvf {} {}'.format(self.bundled_coll, self.dir_for_coll)) @@ -718,7 +718,7 @@ def validate_output(N, y, result): ''' % (self.test_admin_coll_path,)) print(rule_string, file = f, end = '') - IrodsController().start() + IrodsController().start(test_mode=True) irods_rule_language_option = "" #default to python pattern=re.compile(r'^(\S+):\s*(\[.*\]$)',re.M) @@ -798,7 +798,7 @@ def modify_rulebase_and_tst (self,N): ''' % (self.test_admin_coll_path,)) print(rule_string, file = f, end = '') - IrodsController().start() + IrodsController().start(test_mode=True) irods_rule_language_option = "-r irods_rule_engine_plugin-irods_rule_language-instance" pattern=re.compile(r'^(\S+):\s*(\[.*\]$)',re.M) diff --git a/scripts/irods/test/test_python_rule_engine_plugin.py b/scripts/irods/test/test_python_rule_engine_plugin.py index 060f045e98..de96fb70d1 100644 --- a/scripts/irods/test/test_python_rule_engine_plugin.py +++ b/scripts/irods/test/test_python_rule_engine_plugin.py @@ -49,13 +49,13 @@ def append_native_re_to_server_config (with_backup=False): "shared_memory_instance": "irods_rule_language_rule_engine" }] irods_config.commit(irods_config.server_config, irods_config.server_config_path, make_backup=with_backup) - IrodsController().start() + IrodsController().start(test_mode=True) yield finally: IrodsController().stop() irods_config.server_config['plugin_configuration']['rule_engines'] = orig irods_config.commit(irods_config.server_config, irods_config.server_config_path, make_backup=with_backup) - IrodsController().start() + IrodsController().start(test_mode=True) class Test_Python_Rule_Engine_Plugin(resource_suite.ResourceBase, unittest.TestCase): diff --git a/scripts/irods/test/test_resource_types.py b/scripts/irods/test/test_resource_types.py index 15db3ed8a2..abb0561efe 100644 --- a/scripts/irods/test/test_resource_types.py +++ b/scripts/irods/test/test_resource_types.py @@ -588,7 +588,7 @@ def test_key_value_passthru(self): with open(server_config_filename, 'w') as f: f.write(new_server_config) - IrodsController().restart() + IrodsController().restart(test_mode=True) lib.make_file(file_name, 15) initial_log_size = lib.get_file_size_by_path(IrodsConfig().server_log_path) @@ -612,7 +612,7 @@ def test_key_value_passthru(self): start_index=initial_log_size)) finally: - IrodsController().restart() + IrodsController().restart(test_mode=True) if os.path.exists(file_name): os.unlink(file_name) if os.path.exists(other_file_name): @@ -2775,7 +2775,7 @@ def pep_resource_resolve_hierarchy_pre(rule_args, callback, rei): core.add_rule(pep_map[self.plugin_name]) # restart the server to reread the new core.re - IrodsController().restart() + IrodsController().restart(test_mode=True) # manually update the replica in archive vault out, _, _ = self.admin.run_icommand('ils -L ' + filename) @@ -3683,7 +3683,7 @@ def pep_resource_resolve_hierarchy_pre(rule_args, callback, rei): core.add_rule(pep_map[self.plugin_name]) # restart the server to reread the new core.re - IrodsController().restart() + IrodsController().restart(test_mode=True) # manually update the replicas in archive vaults out, _, _ = self.admin.run_icommand('ils -L ' + filename) diff --git a/scripts/irods/test/test_rule_engine_plugin_framework.py b/scripts/irods/test/test_rule_engine_plugin_framework.py index 0516a78fa5..4ef47a57fd 100644 --- a/scripts/irods/test/test_rule_engine_plugin_framework.py +++ b/scripts/irods/test/test_rule_engine_plugin_framework.py @@ -714,7 +714,7 @@ def test_delay_rule(self): with lib.file_backed_up(config.server_config_path): config.server_config['advanced_settings']['delay_server_sleep_time_in_seconds'] = 1 lib.update_json_file_from_dict(config.server_config_path, config.server_config) - IrodsController().restart() + IrodsController().restart(test_mode=True) self.admin.assert_icommand(['irule', '-F', rule_file]) self.admin.assert_icommand('iqstat', 'STDOUT_SINGLELINE', 'irods_policy_execute_rule') @@ -760,7 +760,7 @@ def test_delay_rule_already_scheduled(self): with lib.file_backed_up(config.server_config_path): config.server_config['advanced_settings']['delay_server_sleep_time_in_seconds'] = 1 lib.update_json_file_from_dict(config.server_config_path, config.server_config) - IrodsController().restart() + IrodsController().restart(test_mode=True) self.admin.assert_icommand(['irule', '-F', rule_file]) self.admin.assert_icommand('iqstat', 'STDOUT_SINGLELINE', 'sleep_policy') diff --git a/scripts/irods/test/test_rulebase.py b/scripts/irods/test/test_rulebase.py index 92ec566628..2237afd5a9 100644 --- a/scripts/irods/test/test_rulebase.py +++ b/scripts/irods/test/test_rulebase.py @@ -289,7 +289,7 @@ def test_rulebase_update__2585(self): with open(server_config_filename, 'w') as f: f.write(new_server_config) - IrodsController().restart() + IrodsController().restart(test_mode=True) # checkpoint log to know where to look for the string initial_log_size = lib.get_file_size_by_path(paths.server_log_path()) self.admin.assert_icommand('irule -F ' + rule_file) @@ -307,7 +307,7 @@ def test_rulebase_update__2585(self): lib.delayAssert(lambda: lib.count_occurrences_of_string_in_log(paths.server_log_path(), 'TEST_STRING_TO_FIND_2_2585', start_index=initial_log_size)) # cleanup - IrodsController().restart() + IrodsController().restart(test_mode=True) os.unlink(test_re) os.unlink(rule_file) @@ -503,7 +503,7 @@ def test_rulebase_update_sixty_four_chars__3560(self): with open(server_config_filename, 'w') as f: f.write(new_server_config) - IrodsController().restart() + IrodsController().restart(test_mode=True) # checkpoint log to know where to look for the string initial_log_size = lib.get_file_size_by_path(irods_config.server_log_path) @@ -516,7 +516,7 @@ def test_rulebase_update_sixty_four_chars__3560(self): "TEST_STRING_TO_FIND_DEFECT_3560", start_index=initial_log_size)) # cleanup - IrodsController().restart() + IrodsController().restart(test_mode=True) os.unlink(rulefile1) os.unlink(rulefile2) os.unlink(rulefile3)