diff --git a/dkist/data/test/globus_search_response.json b/dkist/data/test/globus_search_response.json new file mode 100644 index 000000000..a82b9633d --- /dev/null +++ b/dkist/data/test/globus_search_response.json @@ -0,0 +1 @@ +[{"DATA_TYPE": "endpoint", "_rank": 2.21585416793823, "acl_available": true, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "dataxfer#synglobus", "contact_email": null, "contact_info": null, "default_directory": null, "department": null, "description": null, "disable_verify": false, "display_name": null, "expire_time": null, "expires_in": -1, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "d70edd8d-6d04-11e5-ba46-22000b92c6ec", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": false, "location": null, "max_concurrency": 64, "max_parallelism": null, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": "myproxy.globusonline.org", "name": "synglobus", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": null, "owner_id": "bf1f8824-d274-11e5-ba8c-bb8b92e43197", "owner_string": "dataxfer@globusid.org", "preferred_concurrency": 8, "preferred_parallelism": null, "public": true, "s3_owner_activated": true, "s3_url": "https://s3.amazonaws.com/synglobus", "shareable": false, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "dc254d10-ae2c-11e4-adc3-22000a97197b", "tlsftp_server": null, "username": "dataxfer"}, {"DATA_TYPE": "endpoint", "_rank": 1.97268337011337, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "ncar#datashare", "contact_email": "cislhelp@ucar.edu", "contact_info": "1850 Table Mesa Dr.\nBoulder, CO 80305\n(303) 497-2400", "default_directory": "/glade/p/datashare/", "department": "CISL/OSD", "description": "NCAR Globus Data Sharing Endpoint", "disable_verify": false, "display_name": "NCAR Data Sharing Service", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "dd1ee92a-6d04-11e5-ba46-22000b92c6ec", "in_use": false, "info_link": "https://www2.cisl.ucar.edu/docs/transfer/share", "is_globus_connect": false, "is_go_storage": false, "keywords": "file share", "local_user_info_available": true, "location": "41.13,-104.90", "max_concurrency": 16, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": "/DC=org/DC=incommon/C=US/postalCode=80301/ST=CO/L=Boulder/street=3090 Center Green Drive/O=The University Corporation for Atmospheric Research/OU=CISL/CN=gridftp01.ucar.edu", "myproxy_server": "gridftp01.ucar.edu", "name": "datashare", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": "National Center for Atmospheric Research", "owner_id": "b93c7bc4-d274-11e5-a776-435f0e714228", "owner_string": "ncar@globusid.org", "preferred_concurrency": 8, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "8fd6296d-74cc-11e4-a56d-12313922b1c7", "tlsftp_server": null, "username": "ncar"}, {"DATA_TYPE": "endpoint", "_rank": 1.54713439941406, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "wustl#dtn0", "contact_email": "ris@wustl.edu", "contact_info": null, "default_directory": "/gscmnt/gc5002/", "department": "Research Infrastructure Services", "description": "Globus data transfer node named data-xfer-i2.gsc.wustl.edu, also known (publicly) as dtn0.ris.wustl.edu.", "disable_verify": false, "display_name": "MGI storage0 data transfer node", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "e66a20e4-aaf1-11e8-970a-0a6d4e044368", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": true, "location": "Automatic", "max_concurrency": 4, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": "/C=US/O=Globus Consortium/OU=Globus Connect Service/CN=162e4900-ac95-11e8-823b-0a3b7ca8ce66", "myproxy_server": "dtn0.ris.wustl.edu", "name": "dtn0", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": "Washington University in St. Louis", "owner_id": "b88598aa-d274-11e5-a526-abd33fc3ea09", "owner_string": "wustl@globusid.org", "preferred_concurrency": 2, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "89d32130-aa3f-11e8-9704-0a6d4e044368", "tlsftp_server": null, "username": "wustl"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": true, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "abbvieit#a6c4b726-9037-11e8-9664-0a6d4e044368", "contact_email": null, "contact_info": null, "default_directory": null, "department": null, "description": null, "disable_verify": false, "display_name": "ABV-S3-IT-COP-INB-DATA-QA", "expire_time": null, "expires_in": -1, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "a6c4b726-9037-11e8-9664-0a6d4e044368", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": false, "location": null, "max_concurrency": 64, "max_parallelism": null, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": "myproxy.globusonline.org", "name": "a6c4b726-9037-11e8-9664-0a6d4e044368", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": null, "owner_id": "c891e651-54ce-4402-a863-c39493baa13a", "owner_string": "abbvieit@globusid.org", "preferred_concurrency": 8, "preferred_parallelism": null, "public": true, "s3_owner_activated": true, "s3_url": "https://s3.amazonaws.com/abb-humira-complete-inbound-data-qa", "shareable": false, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "1cb996af-9161-11e6-b075-22000b92c261", "tlsftp_server": null, "username": "abbvieit"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "ornldaac#ornlngee", "contact_email": "patelkr@ornl.gov", "contact_info": "", "default_directory": "/mnt/", "department": "NGEE", "description": "Next-Generation Ecosystem Experiments\nAdvancing the predictive power of Earth system models through understanding\nof the structure and function of Arctic terrestrial ecosystems", "disable_verify": false, "display_name": "Admin NGEE Data", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "80e7c9f4-b2be-11e8-8240-0a3b7ca8ce66", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": "NGEE Next-Generation Ecosystem Experiments", "local_user_info_available": null, "location": "Automatic", "max_concurrency": 4, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": "/C=US/O=Globus Consortium/OU=Globus Connect Service/CN=498ed7f6-1b9e-11e9-9f9f-0a06afd4a22e", "myproxy_server": "ngeeglobus.ornl.gov", "name": "ornlngee", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": "ORNL", "owner_id": "2ebcc871-4a7e-4e3c-a526-b02e9eaaf9f1", "owner_string": "ornldaac@globusid.org", "preferred_concurrency": 2, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "76d1ca1f-eee8-11e6-b9ed-22000b9a448b", "tlsftp_server": null, "username": "ornldaac"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "aps#data", "contact_email": null, "contact_info": null, "default_directory": "/gdata/", "department": null, "description": "Voyager DDN system", "disable_verify": false, "display_name": "aps#data", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "9c9cb97e-de86-11e6-9d15-22000a1e3b52", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": true, "location": "Automatic", "max_concurrency": 16, "max_parallelism": 16, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": null, "name": "data", "network_use": "aggressive", "non_functional": false, "oauth_server": "apsdtn01.aps.anl.gov", "organization": null, "owner_id": "a5fbdfb4-d274-11e5-9dda-a7f59dc62279", "owner_string": "aps@globusid.org", "preferred_concurrency": 8, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "9f8a36f3-5639-11e4-b644-12313940394d", "tlsftp_server": null, "username": "aps"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": true, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "brc#fedf3bcc-08c8-11e7-bb17-22000b9a448b", "contact_email": null, "contact_info": null, "default_directory": null, "department": null, "description": null, "disable_verify": false, "display_name": "brc-454-data", "expire_time": null, "expires_in": -1, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "fedf3bcc-08c8-11e7-bb17-22000b9a448b", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": false, "location": null, "max_concurrency": 64, "max_parallelism": null, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": "myproxy.globusonline.org", "name": "fedf3bcc-08c8-11e7-bb17-22000b9a448b", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": null, "owner_id": "b0452386-d274-11e5-bf2a-03d26d789523", "owner_string": "brc@globusid.org", "preferred_concurrency": 8, "preferred_parallelism": null, "public": true, "s3_owner_activated": true, "s3_url": "https://s3.amazonaws.com/454-data", "shareable": false, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "8fad9103-74c5-11e4-a56d-12313922b1c7", "tlsftp_server": null, "username": "brc"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": true, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "brc#ae8bf4b0-eedf-11e6-b9e7-22000b9a448b", "contact_email": null, "contact_info": null, "default_directory": null, "department": null, "description": null, "disable_verify": false, "display_name": "brc-illumina-data-2017", "expire_time": null, "expires_in": -1, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "ae8bf4b0-eedf-11e6-b9e7-22000b9a448b", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": null, "location": null, "max_concurrency": 64, "max_parallelism": null, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": "myproxy.globusonline.org", "name": "ae8bf4b0-eedf-11e6-b9e7-22000b9a448b", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": null, "owner_id": "b0452386-d274-11e5-bf2a-03d26d789523", "owner_string": "brc@globusid.org", "preferred_concurrency": 8, "preferred_parallelism": null, "public": true, "s3_owner_activated": true, "s3_url": "https://s3.amazonaws.com/illumina-data-2017", "shareable": false, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "8fad9103-74c5-11e4-a56d-12313922b1c7", "tlsftp_server": null, "username": "brc"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": true, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "brc#5bd2597c-158e-11e8-b610-0ac6873fc732", "contact_email": null, "contact_info": null, "default_directory": null, "department": null, "description": null, "disable_verify": false, "display_name": "brc-illumina-data-2018", "expire_time": null, "expires_in": -1, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "5bd2597c-158e-11e8-b610-0ac6873fc732", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": null, "location": null, "max_concurrency": 64, "max_parallelism": null, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": "myproxy.globusonline.org", "name": "5bd2597c-158e-11e8-b610-0ac6873fc732", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": null, "owner_id": "b0452386-d274-11e5-bf2a-03d26d789523", "owner_string": "brc@globusid.org", "preferred_concurrency": 8, "preferred_parallelism": null, "public": true, "s3_owner_activated": true, "s3_url": "https://s3.amazonaws.com/illumina-data-2018", "shareable": false, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "8fad9103-74c5-11e4-a56d-12313922b1c7", "tlsftp_server": null, "username": "brc"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": true, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "brc#brc-illumina-data-thru-mid2014", "contact_email": null, "contact_info": null, "default_directory": null, "department": null, "description": null, "disable_verify": false, "display_name": "brc-illumina-data-thru-mid2014", "expire_time": null, "expires_in": -1, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "f6ab6bea-9b0b-11e6-b0c5-22000b92c261", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": false, "location": null, "max_concurrency": 64, "max_parallelism": null, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": "myproxy.globusonline.org", "name": "brc-illumina-data-thru-mid2014", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": null, "owner_id": "b0452386-d274-11e5-bf2a-03d26d789523", "owner_string": "brc@globusid.org", "preferred_concurrency": 8, "preferred_parallelism": null, "public": true, "s3_owner_activated": true, "s3_url": "https://s3.amazonaws.com/brcgenomics", "shareable": false, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "8fad9103-74c5-11e4-a56d-12313922b1c7", "tlsftp_server": null, "username": "brc"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "bucknell#BisonNet", "contact_email": null, "contact_info": null, "default_directory": "/~/", "department": null, "description": "This system has fast storage for the purpose of sharing data with others. This storage is not backed up so a copy of this data should be stored elsewhere.", "disable_verify": false, "display_name": "Bucknell BisonNet Data Transfer Node", "expire_time": null, "expires_in": 0, "force_encryption": true, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "3b3fc9b0-650c-11e8-9253-0a6d4e044368", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": true, "location": "Automatic", "max_concurrency": 4, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": "/C=US/O=Globus Consortium/OU=Globus Connect Service/CN=88df216c-7bc2-11e8-9450-0a6d4e044368", "myproxy_server": "globus.bucknell.edu", "name": "BisonNet", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": null, "owner_id": "de645cfe-55c2-487e-a813-f9cc3c81a4f0", "owner_string": "bucknell@globusid.org", "preferred_concurrency": 2, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "7a0d74aa-5948-11e8-9124-0a6d4e044368", "tlsftp_server": null, "username": "bucknell"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "bucknell#BisonNet-Elastifile", "contact_email": null, "contact_info": null, "default_directory": "/~/", "department": null, "description": "BisonNet high performance computing data is stored here. This data should be considered working/transient, as it is not backed up.", "disable_verify": false, "display_name": "Bucknell BisonNet Elastifile (HPC Data)", "expire_time": null, "expires_in": 0, "force_encryption": true, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "9459ed78-7baa-11e8-944f-0a6d4e044368", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": true, "location": "Automatic", "max_concurrency": 4, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": "/C=US/O=Globus Consortium/OU=Globus Connect Service/CN=8f5678b4-7baa-11e8-944f-0a6d4e044368", "myproxy_server": "globus-elastifile.bucknell.edu", "name": "BisonNet-Elastifile", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": null, "owner_id": "de645cfe-55c2-487e-a813-f9cc3c81a4f0", "owner_string": "bucknell@globusid.org", "preferred_concurrency": 2, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "7a0d74aa-5948-11e8-9124-0a6d4e044368", "tlsftp_server": null, "username": "bucknell"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "dartmouth#dtn", "contact_email": "research.computing@dartmouth.edu", "contact_info": null, "default_directory": "/~/", "department": "ITS", "description": "This is the primary data transfer node at Dartmouth.", "disable_verify": false, "display_name": "Dartmouth Data Transfer Node", "expire_time": null, "expires_in": 0, "force_encryption": true, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "e133a7df-6d04-11e5-ba46-22000b92c6ec", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": "Dartmouth Data Transfer Node", "local_user_info_available": true, "location": "Automatic", "max_concurrency": 4, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": "/C=US/O=Globus Consortium/OU=Globus Connect Service/CN=4e47c18e-a0a3-11e8-96e3-0a6d4e044368", "myproxy_server": "dtn.dartmouth.edu", "name": "dtn", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": "Research Computing", "owner_id": "a7c308fe-d274-11e5-a382-7feb1babd8eb", "owner_string": "dartmouth@globusid.org", "preferred_concurrency": 2, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "78a1d8f9-879c-11e4-ad85-22000a97197b", "tlsftp_server": null, "username": "dartmouth"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "dukeuniversity#DCC-DTN", "contact_email": null, "contact_info": null, "default_directory": "/~/", "department": null, "description": "This Data Transfer Node is provided for members of the Duke community for transferring data into and out of the DCC.", "disable_verify": false, "display_name": "Duke Compute Cluster (DCC) Data Transfer Node", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "1ad66c7c-4f60-11e8-900c-0a6d4e044368", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": true, "location": "Automatic", "max_concurrency": 4, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": null, "name": "DCC-DTN", "network_use": "normal", "non_functional": false, "oauth_server": "cilogon.org", "organization": null, "owner_id": "0eb83c94-6678-44c6-b99c-3d6aa4c2934d", "owner_string": "dukeuniversity@globusid.org", "preferred_concurrency": 2, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "3e60631b-dc50-11e7-976c-22000a8cbd7d", "tlsftp_server": null, "username": "dukeuniversity"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "bcmtmc#globus1", "contact_email": null, "contact_info": null, "default_directory": "/share/share/", "department": null, "description": "", "disable_verify": false, "display_name": "HGSC Data Transfer Node", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "4393a77e-0a96-11e8-a74a-0a448319c2f8", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": true, "location": "Automatic", "max_concurrency": 4, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": null, "name": "globus1", "network_use": "normal", "non_functional": false, "oauth_server": "cilogon.org", "organization": null, "owner_id": "294213f0-0330-4494-aefd-dbcf8b22aa57", "owner_string": "cwilkers@bcm.edu", "preferred_concurrency": 2, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "f90003f5-f2c9-11e6-ba40-22000b9a448b", "tlsftp_server": null, "username": "bcmtmc"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "iurssda#iusda", "contact_email": "store-admin@iu.edu", "contact_info": null, "default_directory": "/~/", "department": null, "description": "", "disable_verify": false, "display_name": "IU - Scholarly Data Archive", "expire_time": null, "expires_in": 0, "force_encryption": true, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "d99acf52-7fe1-11e8-94ca-0a6d4e044368", "in_use": false, "info_link": "https://kb.iu.edu/d/aiyi", "is_globus_connect": false, "is_go_storage": false, "keywords": "SDA,HPSS,MDSS,SDA-CI", "local_user_info_available": true, "location": "Automatic", "max_concurrency": 12, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": null, "name": "iusda", "network_use": "normal", "non_functional": false, "oauth_server": "cilogon.org", "organization": "Indiana University", "owner_id": "5fb396e2-5a54-4718-8a0a-e830fb4e0af9", "owner_string": "iurssda@globusid.org", "preferred_concurrency": 6, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "3de187e8-7594-11e4-a570-12313922b1c7", "tlsftp_server": null, "username": "iurssda"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "ku#crc", "contact_email": "crchelp@ku.edu", "contact_info": "2335 Irving Hill Rd.\nLawrence, KS 66045", "default_directory": "/~/", "department": "Center for Research Computing", "description": "Data connected to the KU Community Cluster may be accessed via this DTN", "disable_verify": false, "display_name": "KU CRC Data Transfer Node", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "51743efc-02c3-11e7-baf3-22000b9a448b", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": "ku, crc", "local_user_info_available": true, "location": "Automatic", "max_concurrency": 4, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": null, "name": "crc", "network_use": "normal", "non_functional": false, "oauth_server": "cilogon.org", "organization": "University of Kansas", "owner_id": "d0de3bc8-d274-11e5-a656-e7605e9f42cb", "owner_string": "ku@globusid.org", "preferred_concurrency": 2, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "815c2167-3c7c-11e5-acaf-22000b92c6ec", "tlsftp_server": null, "username": "ku"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "lrz#smdatamigration", "contact_email": "grid-admin@lrz.de", "contact_info": null, "default_directory": "/~/", "department": "High Performance Computing", "description": "Endpoint provides access to LRZ SuperMUCs High Performance File Systems. Transfer is restricted to/from endpoint LRZ SuperMUC-NG Data Migration (RESTRICTED)", "disable_verify": false, "display_name": "LRZ SuperMUC Data Migration (RESTRICTED)", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "a81542d8-1e1e-11e9-9835-0262a1f2f698", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": "LRZ SuperMUC", "local_user_info_available": true, "location": "48.25,11.65", "max_concurrency": 64, "max_parallelism": 1, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": null, "name": "smdatamigration", "network_use": "custom", "non_functional": false, "oauth_server": "smoauth.dss.lrz.de", "organization": "Leibniz Supercomputing Centre LRZ", "owner_id": "be33a97c-d274-11e5-b792-b7da67a97455", "owner_string": "lrz@globusid.org", "preferred_concurrency": 64, "preferred_parallelism": 1, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "f159af9d-199f-11e5-ac76-22000b92c6ec", "tlsftp_server": null, "username": "lrz"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "lrz#smngdatamigration", "contact_email": "grid-admin@lrz.de", "contact_info": null, "default_directory": "/~/", "department": "High Performance Computing", "description": "Endpoint provides access to LRZ SuperMUC-NGs High Performance File Systems. Transfer is restricted to/from endpoint LRZ SuperMUC Data Migration (RESTRICTED)", "disable_verify": false, "display_name": "LRZ SuperMUC-NG Data Migration (RESTRICTED)", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "d3ee72ca-14ce-11e9-934b-0e3d676669f4", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": "LRZ SuperMUC", "local_user_info_available": true, "location": "48.25,11.65", "max_concurrency": 64, "max_parallelism": 1, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": null, "name": "smngdatamigration", "network_use": "custom", "non_functional": false, "oauth_server": "cilogon.org", "organization": "Leibniz Supercomputing Centre LRZ", "owner_id": "be33a97c-d274-11e5-b792-b7da67a97455", "owner_string": "lrz@globusid.org", "preferred_concurrency": 64, "preferred_parallelism": 1, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "f159af9d-199f-11e5-ac76-22000b92c6ec", "tlsftp_server": null, "username": "lrz"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "nihhpc#globus", "contact_email": "staff@biowulf.nih.gov", "contact_info": null, "default_directory": "/~/", "department": "Center for Information Technology", "description": "High Performance Computing at the NIH (Biowulf & Helix Systems)", "disable_verify": false, "display_name": "NIH HPC Data Transfer", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "e2620047-6d04-11e5-ba46-22000b92c6ec", "in_use": false, "info_link": "http://hpc.nih.gov", "is_globus_connect": false, "is_go_storage": false, "keywords": "nih hpc biowulf", "local_user_info_available": true, "location": "Automatic", "max_concurrency": 32, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": null, "name": "globus", "network_use": "normal", "non_functional": false, "oauth_server": "cilogon.org", "organization": "National Institutes of Health", "owner_id": "a6f3ae74-d274-11e5-a0e5-232d9b00dc0c", "owner_string": "nihhpc@globusid.org", "preferred_concurrency": 16, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "7db3403a-71ae-11e4-a569-12313922b1c7", "tlsftp_server": null, "username": "nihhpc"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "neutrons#dtn01.sns.gov", "contact_email": "globus@support.sns.gov", "contact_info": "", "default_directory": "/SNS/", "department": "Neutron Sciences", "description": "Oak Ridge National Laboratory - Experiment data for Neutron User Facilities (High Flux Isotope Reactor and Spallation Neutron Source)", "disable_verify": false, "display_name": "ORNL HFIR/SNS Experiment Data", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "1af4dc36-ef70-11e5-9830-22000b9da45e", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": "ornl hfir sns neutron neutrons oak ridge", "local_user_info_available": true, "location": "Automatic", "max_concurrency": 4, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": "/C=US/O=Globus Consortium/OU=Globus Connect Service/CN=26436a5e-f95d-11e8-9341-0e3d676669f4", "myproxy_server": "dtn01.sns.gov", "name": "dtn01.sns.gov", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": "Oak Ridge National Laboratory", "owner_id": "f4b47286-ed42-11e5-8344-8baed185ff0f", "owner_string": "neutrons@globusid.org", "preferred_concurrency": 2, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "f7e77d81-eee6-11e6-b9ed-22000b9a448b", "tlsftp_server": null, "username": "neutrons"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "purdue#depot", "contact_email": "rcac-help@purdue.edu", "contact_info": null, "default_directory": "/depot/", "department": "Research Computing", "description": "This endpoint provides access to the Purdue Research Data Depot storage - /depot", "disable_verify": false, "display_name": "Purdue Research Computing - Data Depot", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "c0be7650-d723-11e5-9768-22000b9da45e", "in_use": false, "info_link": "https://www.rcac.purdue.edu/storage/depot/", "is_globus_connect": false, "is_go_storage": false, "keywords": "purdue, depot ", "local_user_info_available": true, "location": "Automatic", "max_concurrency": 12, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": null, "name": "depot", "network_use": "normal", "non_functional": false, "oauth_server": "cilogon.org", "organization": "Purdue University", "owner_id": "b0b80e28-d274-11e5-8bf8-0b3916b4be53", "owner_string": "purdue@globusid.org", "preferred_concurrency": 6, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "f2e335f6-74d6-11e4-a56d-12313922b1c7", "tlsftp_server": null, "username": "purdue"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "rice#dtn", "contact_email": "helpdesk@rice.edu", "contact_info": null, "default_directory": "/work/", "department": "Center for Research Computing", "description": "Data transfer node for /work and /scratch filesystems on DAVinCI", "disable_verify": false, "display_name": "Rice CRC Data Transfer Node", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "e427426b-6d04-11e5-ba46-22000b92c6ec", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": true, "location": "Automatic", "max_concurrency": 4, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": null, "name": "dtn", "network_use": "normal", "non_functional": false, "oauth_server": "cilogon.org", "organization": "Rice University", "owner_id": "a5786de6-d274-11e5-9c2d-dfbab5b26b4b", "owner_string": "rice@globusid.org", "preferred_concurrency": 2, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "035c42aa-528b-11e5-af82-22000b92c6ec", "tlsftp_server": null, "username": "rice"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": false, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "rice#dtn2", "contact_email": "helpdesk@rice.edu", "contact_info": null, "default_directory": "/poscratch/", "department": "Center for Research Computing", "description": "Data transfer node for /scratch filesystem on PowerOmics", "disable_verify": false, "display_name": "Rice CRC Data Transfer Node 2", "expire_time": null, "expires_in": 0, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "fdf1c860-bbbc-11e5-9a07-22000b96db58", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": true, "location": "Automatic", "max_concurrency": 4, "max_parallelism": 8, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": null, "name": "dtn2", "network_use": "normal", "non_functional": false, "oauth_server": "cilogon.org", "organization": "Rice University", "owner_id": "a5786de6-d274-11e5-9c2d-dfbab5b26b4b", "owner_string": "rice@globusid.org", "preferred_concurrency": 2, "preferred_parallelism": 4, "public": true, "s3_owner_activated": false, "s3_url": null, "shareable": true, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "035c42aa-528b-11e5-af82-22000b92c6ec", "tlsftp_server": null, "username": "rice"}, {"DATA_TYPE": "endpoint", "_rank": 1.48634168505669, "acl_available": true, "acl_editable": false, "activated": false, "authentication_assurance_timeout": null, "canonical_name": "sirosen#616aeee4-8bec-11e6-b047-22000b92c261", "contact_email": null, "contact_info": null, "default_directory": "/", "department": null, "description": null, "disable_verify": false, "display_name": "Search Test Data", "expire_time": null, "expires_in": -1, "force_encryption": false, "gcp_connected": null, "gcp_paused": null, "globus_connect_setup_key": null, "host_endpoint": null, "host_endpoint_display_name": null, "host_endpoint_id": null, "host_path": null, "https_server": null, "id": "616aeee4-8bec-11e6-b047-22000b92c261", "in_use": false, "info_link": null, "is_globus_connect": false, "is_go_storage": false, "keywords": null, "local_user_info_available": false, "location": null, "max_concurrency": 64, "max_parallelism": null, "my_effective_roles": [], "myproxy_dn": null, "myproxy_server": "myproxy.globusonline.org", "name": "616aeee4-8bec-11e6-b047-22000b92c261", "network_use": "normal", "non_functional": false, "oauth_server": null, "organization": null, "owner_id": "ae332d86-d274-11e5-b885-b31714a110e9", "owner_string": "sirosen@globusid.org", "preferred_concurrency": 8, "preferred_parallelism": null, "public": true, "s3_owner_activated": true, "s3_url": "https://s3.amazonaws.com/search-test-data-store", "shareable": false, "sharing_target_endpoint": null, "sharing_target_root_path": null, "storage_type": null, "subscription_id": "01d78492-e4c0-11e6-b97a-22000b9a448b", "tlsftp_server": null, "username": "sirosen"}] \ No newline at end of file diff --git a/dkist/utils/globus/endpoints.py b/dkist/utils/globus/endpoints.py index 1a41fdcf2..31cd55767 100644 --- a/dkist/utils/globus/endpoints.py +++ b/dkist/utils/globus/endpoints.py @@ -100,7 +100,7 @@ def get_endpoint_id(endpoint, tfr_client): return responses[0]['id'] -def auto_activate_endpoint(tfr_client, endpoint_id): +def auto_activate_endpoint(tfr_client, endpoint_id): # pragma: no cover """ Perform activation of a Globus endpoint. diff --git a/dkist/utils/globus/tests/test_endpoints.py b/dkist/utils/globus/tests/test_endpoints.py new file mode 100644 index 000000000..67a50cc63 --- /dev/null +++ b/dkist/utils/globus/tests/test_endpoints.py @@ -0,0 +1,113 @@ +from unittest import mock +import json + +import globus_sdk +import pytest + +from dkist.data.test import rootdir +from dkist.utils.globus.endpoints import (get_endpoint_id, get_local_endpoint_id, + get_transfer_client, get_directory_listing) + + +@pytest.fixture +def endpoint_search(): + with open(rootdir / "globus_search_response.json") as fd: + data = json.load(fd) + + data = [globus_sdk.response.GlobusResponse(d) for d in data][1:] + return data + + +@pytest.fixture +def transfer_client(mocker): + mocker.patch("dkist.utils.globus.auth.get_refresh_token_authorizer", return_value=None) + return get_transfer_client() + + +@pytest.fixture +def mock_search(mocker): + mocker.patch("globus_sdk.TransferClient.endpoint_search", + return_value=globus_sdk.transfer.paging.PaginatedResource) + return mocker.patch("globus_sdk.transfer.paging.PaginatedResource.data", + new_callable=mock.PropertyMock) + + +def test_get_transfer_client(mocker, transfer_client): + assert isinstance(transfer_client, globus_sdk.TransferClient) + + +@pytest.mark.parametrize("endpoint_id", ("12345", None)) +def test_get_local_endpoint_id(mocker, endpoint_id): + lgcp_mock = mocker.patch("globus_sdk.LocalGlobusConnectPersonal.endpoint_id", + new_callable=mock.PropertyMock) + lgcp_mock.return_value = endpoint_id + + if endpoint_id is None: + with pytest.raises(ConnectionError): + get_local_endpoint_id() + else: + a = get_local_endpoint_id() + assert a is endpoint_id + + +def test_get_endpoint_id_search(mocker, mock_search, endpoint_search, transfer_client): + mock_search.return_value = endpoint_search + + transfer_client = get_transfer_client() + + # Test exact display name match + endpoint_id = get_endpoint_id('NCAR Data Sharing Service', transfer_client) + assert endpoint_id == "dd1ee92a-6d04-11e5-ba46-22000b92c6ec" + + # Test multiple match fail + with pytest.raises(ValueError) as exc: + get_endpoint_id(" ", transfer_client) + assert "Multiple" in str(exc.value) + + # Test just one result + mock_search.return_value = endpoint_search[0:1] + endpoint_id = get_endpoint_id(" ", transfer_client) + assert endpoint_id == "dd1ee92a-6d04-11e5-ba46-22000b92c6ec" + + # Test no results + mock_search.return_value = [] + with pytest.raises(ValueError) as e_info: + get_endpoint_id(" ", transfer_client) + assert "No matches" in str(e_info.value) + + +def test_get_endpoint_id_uuid(mocker, transfer_client, endpoint_search): + mocker.patch.object(transfer_client, "get_endpoint", + mock.Mock(return_value=globus_sdk.transfer.paging.PaginatedResource)) + get_ep_mock = mocker.patch("globus_sdk.transfer.paging.PaginatedResource.data", + new_callable=mock.PropertyMock) + get_ep_mock.return_value = endpoint_search[0:1] + + endpoint_id = get_endpoint_id('dd1ee92a-6d04-11e5-ba46-22000b92c6ec', transfer_client) + assert endpoint_id == "dd1ee92a-6d04-11e5-ba46-22000b92c6ec" + + +def test_get_endpoint_id_invalid_uuid(mocker, mock_search, transfer_client, endpoint_search): + err = globus_sdk.TransferAPIError(mock.MagicMock()) + mocker.patch("globus_sdk.TransferClient.get_endpoint", + side_effect=err) + mock_search.return_value = endpoint_search[0:1] + + # Test Other transfer error + with pytest.raises(globus_sdk.TransferAPIError): + get_endpoint_id("wibble", transfer_client) + + # Test EndpointNotFound error + mocker.patch.object(err, "code", "EndpointNotFound") + endpoint_id = get_endpoint_id("wibble", transfer_client) + assert endpoint_id == "dd1ee92a-6d04-11e5-ba46-22000b92c6ec" + + +def test_directory_listing(mocker, transfer_client): + mocker.patch("dkist.utils.globus.endpoints.get_transfer_client", + return_value=transfer_client) + mocker.patch("dkist.utils.globus.endpoints.auto_activate_endpoint") + mocker.patch("dkist.utils.globus.endpoints.get_local_endpoint_id", + return_value="12345") + + # get_directory_listing("/")