Skip to content

Commit

Permalink
Merge pull request #139 from NickolausDS/fix-transfer-labels
Browse files Browse the repository at this point in the history
chore: Fix missing transfer attribute on tests
  • Loading branch information
NickolausDS authored Sep 18, 2024
2 parents e1ba852 + 5c7fb36 commit 4542845
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions globus_jupyterlab/tests/api/test_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ def test_transfer_submission_normal(
data={"task_id": "my_taks_id"}
)
body = json.dumps(
{"source_endpoint": "mysource", "destination_endpoint": "mydest", "DATA": []}
{
"source_endpoint": "mysource",
"destination_endpoint": "mydest",
"DATA": [],
"label": "My Transfer",
}
)
response = yield http_client.fetch(
base_url + f"/submit_transfer", raise_error=False, method="POST", body=body
Expand Down Expand Up @@ -209,6 +214,7 @@ def test_transfer_submission_normal(
"recursive": False,
}
],
"label": "My Transfer",
},
("foo.txt", "foo.txt", False),
"Base case, no path translation",
Expand All @@ -227,6 +233,7 @@ def test_transfer_submission_normal(
"recursive": False,
}
],
"label": "My Transfer",
},
("foo.txt", "foo.txt", False),
"Rationally configured environment",
Expand All @@ -245,6 +252,7 @@ def test_transfer_submission_normal(
"recursive": False,
}
],
"label": "My Transfer",
},
("foo.txt", "foo.txt", False),
"Missing Trailing Slash",
Expand All @@ -263,6 +271,7 @@ def test_transfer_submission_normal(
"recursive": False,
}
],
"label": "My Transfer",
},
("foo.txt", "foo.txt", False),
"Test Translating Destination",
Expand All @@ -281,6 +290,7 @@ def test_transfer_submission_normal(
"recursive": False,
}
],
"label": "My Transfer",
},
("/shared/foo.txt", "foo.txt", False),
"Test Collection Base Path",
Expand All @@ -299,6 +309,7 @@ def test_transfer_submission_normal(
"recursive": False,
}
],
"label": "My Transfer",
},
("shared/foo.txt", "foo.txt", False),
"Test Relative Collection Base Path",
Expand All @@ -317,6 +328,7 @@ def test_transfer_submission_normal(
"recursive": False,
}
],
"label": "My Transfer",
},
("/shared/foo.txt", "foo.txt", False),
"Test both posix basepath with collection basepath",
Expand All @@ -335,6 +347,7 @@ def test_transfer_submission_normal(
"recursive": False,
}
],
"label": "My Transfer",
},
("/shared/foo.txt", "foo.txt", False),
"Test trailing slash",
Expand All @@ -353,6 +366,7 @@ def test_transfer_submission_normal(
"recursive": False,
}
],
"label": "My Transfer",
},
500,
"Test no hub collection for transfer",
Expand All @@ -371,6 +385,7 @@ def test_transfer_submission_normal(
"recursive": False,
}
],
"label": "My Transfer",
},
400,
"Test transfer is outside share path",
Expand Down Expand Up @@ -422,7 +437,12 @@ def test_401_transfer_submission_normal(
"401 error!", http_status=401
)
body = json.dumps(
{"source_endpoint": "mysource", "destination_endpoint": "mydest", "DATA": []}
{
"source_endpoint": "mysource",
"destination_endpoint": "mydest",
"DATA": [],
"label": "My Transfer",
}
)
response = yield http_client.fetch(
base_url + f"/submit_transfer", raise_error=False, method="POST", body=body
Expand Down Expand Up @@ -470,6 +490,7 @@ def test_transfer_submission_custom_valid_non_hub_service(
"recursive": False,
}
],
"label": "My Transfer",
}
)
response = yield http_client.fetch(
Expand All @@ -486,7 +507,7 @@ def test_transfer_submission_custom_valid_non_hub_service(
"transfer": {
"source_endpoint": "mysource",
"destination_endpoint": "mydest",
"label": None,
"label": "My Transfer",
"DATA": [
{
"source_path": "foo.txt",
Expand Down Expand Up @@ -529,6 +550,7 @@ def test_transfer_submission_custom_valid_hub_service(
"recursive": False,
}
],
"label": "My Transfer",
}
)
response = yield http_client.fetch(
Expand All @@ -553,6 +575,7 @@ def test_transfer_submission_custom_valid_hub_service(
"recursive": False,
}
],
"label": "My Transfer",
},
},
)
Expand All @@ -575,7 +598,12 @@ def test_transfer_submission_custom_no_task_id_returned(
data={"task_id": "my_taks_id"}
)
body = json.dumps(
{"source_endpoint": "mysource", "destination_endpoint": "mydest", "DATA": []}
{
"source_endpoint": "mysource",
"destination_endpoint": "mydest",
"DATA": [],
"label": "My Transfer",
}
)
response = yield http_client.fetch(
base_url + f"/submit_transfer", raise_error=False, method="POST", body=body
Expand All @@ -602,7 +630,12 @@ def test_transfer_submission_custom_resource_server_error(
data={"task_id": "my_taks_id"}
)
body = json.dumps(
{"source_endpoint": "mysource", "destination_endpoint": "mydest", "DATA": []}
{
"source_endpoint": "mysource",
"destination_endpoint": "mydest",
"DATA": [],
"label": "My Transfer",
}
)
response = yield http_client.fetch(
base_url + f"/submit_transfer", raise_error=False, method="POST", body=body
Expand Down

0 comments on commit 4542845

Please sign in to comment.