Skip to content
Snippets Groups Projects

Resolve TMSS-2829

Merged Jorrit Schaap requested to merge TMSS-2829 into master
3 files
+ 13
4
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -20,6 +20,7 @@
import unittest
import uuid
import os
from unittest import mock
import logging
logger = logging.getLogger('lofar.'+__name__)
@@ -63,8 +64,17 @@ class TestCopyService(unittest.TestCase):
cls.tmss_test_env.stop()
cls.tmp_exchange.close()
def setUp(self):
def mocked_wrap_command_in_cep4_head_node_ssh_call(cmd, *args, **kwargs):
logger.info('mocked_wrap_command_in_cep4_head_node_ssh_call returning original command (without ssh): %s', ' '.join(cmd))
return cmd
def test_copy(self):
wrap_command_in_cep4_head_node_ssh_call_patcher = mock.patch('lofar.sas.tmss.services.copy_service.wrap_command_in_cep4_available_node_with_lowest_load_ssh_call')
self.addCleanup(wrap_command_in_cep4_head_node_ssh_call_patcher.stop)
self.wrap_command_in_cep4_head_node_ssh_call_mock = wrap_command_in_cep4_head_node_ssh_call_patcher.start()
self.wrap_command_in_cep4_head_node_ssh_call_mock.side_effect = mocked_wrap_command_in_cep4_head_node_ssh_call
def test_copy_managed_and_unmanaged(self):
from lofar.sas.tmss.tmss.tmssapp.models import SchedulingUnitObservingStrategyTemplate, SchedulingSet, SubtaskType
from lofar.sas.tmss.tmss.tmssapp.tasks import create_scheduling_unit_draft_from_observing_strategy_template, create_scheduling_unit_blueprint_and_tasks_and_subtasks_from_scheduling_unit_draft, create_cleanuptask_for_scheduling_unit_blueprint
from lofar.sas.tmss.tmss.tmssapp.subtasks import schedule_subtask, wait_for_subtask_status
Loading