Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions coriolis/providers/replicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ def _exec_replicator(self, ssh, port, certs, state_file):
})
utils.create_service(
ssh, cmdline, REPLICATOR_SVC_NAME,
run_as=REPLICATOR_USERNAME)
run_as=REPLICATOR_USERNAME, start=True)

def _fetch_remote_file(self, ssh, remote_file, local_file):
# TODO(gsamfira): make this re-usable
Expand Down Expand Up @@ -758,7 +758,6 @@ def _setup_replicator(self, ssh):
certs = self._setup_certificates(ssh, args)
self._exec_replicator(
ssh, args["port"], certs["remote"], REPLICATOR_STATE)
self.start()
return certs["local"]

def _get_size_from_chunks(self, chunks):
Expand Down
8 changes: 4 additions & 4 deletions coriolis/tests/providers/test_replicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,9 @@ def test__exec_replicator_cmd(self, mock_create_service):
mock_create_service.assert_called_once_with(
self._ssh, mock.ANY,
replicator_module.REPLICATOR_SVC_NAME,
run_as=replicator_module.REPLICATOR_USERNAME)
run_as=replicator_module.REPLICATOR_USERNAME,
start=True,
)

@mock.patch.object(replicator_module.utils, 'read_ssh_file')
def test__fetch_remote_file(self, mock_read_ssh_file):
Expand Down Expand Up @@ -982,9 +984,8 @@ def test_setup_certificates_no_files_exist(
@mock.patch.object(replicator_module.Replicator, '_setup_replicator_user')
@mock.patch.object(replicator_module.Replicator, '_setup_certificates')
@mock.patch.object(replicator_module.Replicator, '_exec_replicator')
@mock.patch.object(replicator_module.Replicator, 'start')
def test__setup_replicator(
self, mock_start, mock_exec_replicator, mock_setup_certificates,
self, mock_exec_replicator, mock_setup_certificates,
mock_setup_replicator_user, mock_reconnect_ssh,
mock_setup_replicator_group, mock_copy_replicator_cmd,
mock_parse_replicator_conn_info, mock_os_remove,
Expand Down Expand Up @@ -1029,7 +1030,6 @@ def test__setup_replicator(
mock_parse_replicator_conn_info.return_value['port'],
mock_setup_certificates.return_value['remote'],
replicator_module.REPLICATOR_STATE)
mock_start.assert_called_once()

self.assertEqual(result, mock_setup_certificates.return_value['local'])

Expand Down
Loading