Skip to content
Snippets Groups Projects
Commit c65bc5bc authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-215: fixed tests

parent 74375576
No related branches found
No related tags found
1 merge request!197Resolve TMSS-215
......@@ -7,6 +7,7 @@
"task_connector": {
"type": "object",
"additionalProperties": false,
"default": {},
"properties": {
"role": {
"type": "string",
......@@ -28,6 +29,7 @@
"title": "Tasks",
"type": "object",
"uniqueItems": true,
"default": {},
"additionalProperties": {
"type": "object",
"title": "Task",
......@@ -70,6 +72,7 @@
"task_relations": {
"title": "Task Relations",
"type": "array",
"default": [],
"additionalItems": false,
"uniqueItems": true,
"items": {
......@@ -132,6 +135,7 @@
"task_scheduling_relations": {
"title": "Task Scheduling Relations",
"type": "array",
"default": [],
"additionalItems": false,
"uniqueItems": true,
"items": {
......
......@@ -75,7 +75,8 @@ class SchedulingTest(unittest.TestCase):
subtask_data = test_data_creator.Subtask(specifications_template_url=subtask_template['url'],
specifications_doc=spec,
cluster_url=cluster_url)
cluster_url=cluster_url,
task_blueprint_url=test_data_creator.post_data_and_get_url(test_data_creator.TaskBlueprint(), '/task_blueprint/'))
subtask = test_data_creator.post_data_and_get_response_as_json_object(subtask_data, '/subtask/')
subtask_id = subtask['id']
test_data_creator.post_data_and_get_url(test_data_creator.SubtaskOutput(subtask_url=subtask['url']), '/subtask_output/')
......@@ -138,7 +139,8 @@ class SchedulingTest(unittest.TestCase):
obs_subtask_data = test_data_creator.Subtask(specifications_template_url=obs_subtask_template['url'],
specifications_doc=obs_spec,
cluster_url=cluster_url)
cluster_url=cluster_url,
task_blueprint_url=test_data_creator.post_data_and_get_url(test_data_creator.TaskBlueprint(), '/task_blueprint/'))
obs_subtask = test_data_creator.post_data_and_get_response_as_json_object(obs_subtask_data, '/subtask/')
obs_subtask_output_url = test_data_creator.post_data_and_get_url(test_data_creator.SubtaskOutput(subtask_url=obs_subtask['url']), '/subtask_output/')
test_data_creator.post_data_and_get_url(test_data_creator.Dataproduct(filename="L%s_SB000.MS"%obs_subtask['id'],
......@@ -179,14 +181,12 @@ class SchedulingTest(unittest.TestCase):
obs_task['QA']['plots']['enabled'] = False
obs_task['QA']['file_conversion']['enabled'] = False
obs_task['SAPs'][0]['subbands'] = [0,1]
scheduling_unit_doc['tasks'].append({"name": "Observation",
"specifications_doc": obs_task,
"specifications_template": "observation schema"})
scheduling_unit_doc['tasks']["Observation"] = {"specifications_doc": obs_task,
"specifications_template": "observation schema"}
# define a pipeline
scheduling_unit_doc['tasks'].append({"name": "Pipeline",
"specifications_doc": get_default_json_object_for_schema(client.get_task_template(name="preprocessing schema")['schema']),
"specifications_template": "preprocessing schema"})
scheduling_unit_doc['tasks']["Pipeline"] = { "specifications_doc": get_default_json_object_for_schema(client.get_task_template(name="preprocessing schema")['schema']),
"specifications_template": "preprocessing schema"}
# connect obs to pipeline
scheduling_unit_doc['task_relations'].append({"producer": "Observation",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment