@@ -15,13 +15,13 @@ def _make_mapped_collection_search_result(
1515 endpoint_id : str ,
1616 display_name : str ,
1717 owner_string : str ,
18+ manager_fqdn : str ,
19+ collection_fqdn : str ,
1820) -> dict [str , t .Any ]:
1921 # most of the fields are filled with dummy data
2022 # some of these values are pulled out here either to ensure their integrity
2123 # or to make them more visible to a reader
2224 username = "u_abcdefghijklmnop" # not a real b32 username
23- manager_fqdn = "a0bc1.23de.data.globus.org"
24- collection_fqdn = f"m-f45678.{ manager_fqdn } "
2525
2626 data = {
2727 "DATA_TYPE" : "endpoint" ,
@@ -123,6 +123,9 @@ def singular_search_response():
123123 endpoint_id = str (uuid .uuid4 ())
124124 display_name = "dummy result"
125125 owner_string = "globus@globus.org"
126+ manager_fqdn = "a0bc1.23de.data.globus.org"
127+ collection_fqdn = f"m-f45678.{ manager_fqdn } "
128+
126129 return RegisteredResponse (
127130 service = "transfer" ,
128131 path = "/v0.10/endpoint_search" ,
@@ -131,11 +134,17 @@ def singular_search_response():
131134 "endpoint_id" : endpoint_id ,
132135 "display_name" : display_name ,
133136 "owner_string" : owner_string ,
137+ "collection_fqdn" : collection_fqdn ,
134138 },
135139 json = {
136140 "DATA" : [
137141 _make_mapped_collection_search_result (
138- collection_id , endpoint_id , display_name , owner_string
142+ collection_id ,
143+ endpoint_id ,
144+ display_name ,
145+ owner_string ,
146+ manager_fqdn ,
147+ collection_fqdn ,
139148 )
140149 ],
141150 "DATA_TYPE" : "endpoint_list" ,
@@ -162,20 +171,22 @@ def test_search_shows_collection_id(run_line, singular_search_response):
162171 header_line , separator_line , data_line = lines
163172
164173 # the header line shows the field names in order
165- header_row = re .split (r"\s+\|\s+" , header_line )
166- assert header_row == ["ID" , "Owner" , "Display Name" ]
174+ header_row = [ header . strip () for header in re .split (r"\s+\|\s+" , header_line )]
175+ assert header_row == ["ID" , "Owner" , "Display Name" , "Domain" ]
167176 # the separator line is a series of dashes
177+
168178 separator_row = separator_line .split ("-+-" )
169- assert len (separator_row ) == 3
179+ assert len (separator_row ) == 4
170180 for separator in separator_row :
171181 assert set (separator ) == {"-" } # exactly one character is used
172182
173- # the data row should have the collection ID, Owner, and Display Name
183+ # the data row should have the collection ID, Owner, Display Name, and Domain
174184 data_row = re .split (r"\s+\|\s+" , data_line )
175185 assert data_row == [
176186 meta ["collection_id" ],
177187 meta ["owner_string" ],
178188 meta ["display_name" ],
189+ meta ["collection_fqdn" ],
179190 ]
180191
181192 # final sanity check -- the endpoint ID for a mapped collection doesn't
0 commit comments