| 1 |
from globus_sdk.testing.models import RegisteredResponse, ResponseSet |
| 2 |
|
| 3 |
from ._common import ENDPOINT_ID |
| 4 |
|
| 5 |
RESPONSES = ResponseSet( |
| 6 |
metadata={"endpoint_id": ENDPOINT_ID}, |
| 7 |
default=RegisteredResponse( |
| 8 |
service="transfer", |
| 9 |
method="GET", |
| 10 |
path=f"/v0.10/operation/endpoint/{ENDPOINT_ID}/stat", |
| 11 |
json={ |
| 12 |
"DATA_TYPE": "file", |
| 13 |
"group": "tutorial", |
| 14 |
"last_modified": "2023-12-18 16:52:50+00:00", |
| 15 |
"link_group": None, |
| 16 |
"link_last_modified": None, |
| 17 |
"link_size": None, |
| 18 |
"link_target": None, |
| 19 |
"link_user": None, |
| 20 |
"name": "file1.txt", |
| 21 |
"permissions": "0644", |
| 22 |
"size": 4, |
| 23 |
"type": "file", |
| 24 |
"user": "tutorial", |
| 25 |
}, |
| 26 |
), |
| 27 |
not_found=RegisteredResponse( |
| 28 |
service="transfer", |
| 29 |
method="GET", |
| 30 |
path=f"/v0.10/operation/endpoint/{ENDPOINT_ID}/stat", |
| 31 |
status=404, |
| 32 |
json={ |
| 33 |
"code": "NotFound", |
| 34 |
"message": f"Path not found, Error (list)\nEndpoint: Globus Tutorial Collection 1 ({ENDPOINT_ID})\nServer: 100.26.231.26:443\nMessage: No such file or directory\n---\nDetails: Error: '~/foo' not found\\r\\n550-GlobusError: v=1 c=PATH_NOT_FOUND\\r\\n550-GridFTP-Errno: 2\\r\\n550-GridFTP-Reason: System error in stat\\r\\n550-GridFTP-Error-String: No such file or directory\\r\\n550 End.\\r\\n\n", # noqa 501 |
| 35 |
"request_id": "aaabbbccc", |
| 36 |
"resource": f"/v0.10/operation/endpoint/{ENDPOINT_ID}/stat", |
| 37 |
}, |
| 38 |
), |
| 39 |
permission_denied=RegisteredResponse( |
| 40 |
service="transfer", |
| 41 |
method="GET", |
| 42 |
path=f"/v0.10/operation/endpoint/{ENDPOINT_ID}/stat", |
| 43 |
status=403, |
| 44 |
json={ |
| 45 |
"code": "EndpointPermissionDenied", |
| 46 |
"message": f"Denied by endpoint, Error (list)\nEndpoint: Globus Tutorial Collection 1 ({ENDPOINT_ID})\nServer: 100.26.231.26:443\nCommand: MLST /foo\nMessage: Fatal FTP Response\n---\nDetails: 500 Command failed : Path not allowed.\\r\\n\n", # noqa 501 |
| 47 |
"request_id": "aaabbbccc", |
| 48 |
"resource": f"/v0.10/operation/endpoint/{ENDPOINT_ID}/stat", |
| 49 |
}, |
| 50 |
), |
| 51 |
) |