Skip to content

Commit

Permalink
Keep transfer items schema intact
Browse files Browse the repository at this point in the history
  • Loading branch information
BenGalewsky committed Jan 28, 2024
1 parent 9bca054 commit 5410d0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aws/automate_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def create_transfer_items(self, data_sources, organization,
"label": "MDF Flow Test Transfer1",
"source_endpoint_id": None,
"submitting-user-id": submitting_user_id,
"dataset_path": destination_parsed.path+source_id+"/",
"transfer_items": []
}

Expand Down Expand Up @@ -214,7 +215,6 @@ def create_transfer_items(self, data_sources, organization,
"All datasets must come from the same globus endpoint")
user_transfer_inputs['transfer_items'].append(
{
"dataset_path": destination_parsed.path+source_id+"/",
"destination_path": destination_parsed.path+source_id+"/"+version+"/",
"recursive": True,
"source_path": transfer_params['origin_path'][0]
Expand Down
3 changes: 2 additions & 1 deletion aws/tests/test_automate_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ def test_create_transfer_items(self, _, secrets, organization, set_environ):
assert result['destination_endpoint_id'] == '82f1b5c6-6e9b-11e5-ba47-22000b92c6ec'
assert result['source_endpoint_id'] == 'e38ee745-6d04-11e5-ba46-22000b92c6ec'
assert result['submitting-user-id'] == '12-33-55'
assert result['dataset_path'] == '/mdf_open/myTestDataset/'

assert len(result['transfer_items']) == 1
assert result['transfer_items'][0]['source_path'] == '/MDF/mdf_connect/test_files/canonical_datasets/dft/'
assert result['transfer_items'][0]['destination_path'] == '/mdf_open/myTestDataset/1.0.1/'
assert result['transfer_items'][0]['dataset_path'] == '/mdf_open/myTestDataset/'
print(result)


Expand Down

0 comments on commit 5410d0c

Please sign in to comment.