@@ -135,7 +135,7 @@ def curl_range(ts, path="", ifrange=None, start=1, end=5):
135
135
136
136
# ATS should ignore the Range header when given an If-Range header with the incorrect etag
137
137
tr = Test .AddTestRun ()
138
- tr .MakeCurlCommand (curl_range (ts , ifrange = '"should-not-match"' ))
138
+ tr .MakeCurlCommand (curl_range (ts , ifrange = '"should-not-match"' ), uds_path = ts . Variables . uds_path )
139
139
tr .Processes .Default .ReturnCode = 0
140
140
tr .Processes .Default .StartBefore (microserver , ready = When .PortOpen (microserver .Variables .Port ))
141
141
tr .Processes .Default .StartBefore (origin , ready = When .PortOpen (origin .Variables .port ))
@@ -147,66 +147,67 @@ def curl_range(ts, path="", ifrange=None, start=1, end=5):
147
147
148
148
# ATS should respond to Range requests with partial content
149
149
tr = Test .AddTestRun ()
150
- tr .MakeCurlCommand (curl_range (ts ))
150
+ tr .MakeCurlCommand (curl_range (ts ), uds_path = ts . Variables . uds_path )
151
151
tr .Processes .Default .ReturnCode = 0
152
152
tr .Processes .Default .Streams .stdout = "gold/range-206.gold"
153
153
154
154
# ATS should respond to Range requests with partial content when given an If-Range header with
155
155
# the correct etag
156
156
tr = Test .AddTestRun ()
157
- tr .MakeCurlCommand (curl_range (ts , ifrange = '"range"' ))
157
+ tr .MakeCurlCommand (curl_range (ts , ifrange = '"range"' ), uds_path = ts . Variables . uds_path )
158
158
tr .Processes .Default .ReturnCode = 0
159
159
tr .Processes .Default .Streams .stdout = "gold/range-206.gold"
160
160
161
161
# ATS should respond to Range requests with partial content when given an If-Range header
162
162
# that matches the Last-Modified header of the cached response
163
163
tr = Test .AddTestRun ()
164
- tr .MakeCurlCommand (curl_range (ts , ifrange = "Thu, 10 Feb 2022 00:00:00 GMT" ))
164
+ tr .MakeCurlCommand (curl_range (ts , ifrange = "Thu, 10 Feb 2022 00:00:00 GMT" ), uds_path = ts . Variables . uds_path )
165
165
tr .Processes .Default .ReturnCode = 0
166
166
tr .Processes .Default .Streams .stdout = "gold/range-206.gold"
167
167
168
168
# ATS should respond to Range requests with the full content when given an If-Range header
169
169
# that doesn't match the Last-Modified header of the cached response
170
170
tr = Test .AddTestRun ()
171
- tr .MakeCurlCommand (curl_range (ts , ifrange = "Thu, 10 Feb 2022 01:00:00 GMT" ))
171
+ tr .MakeCurlCommand (curl_range (ts , ifrange = "Thu, 10 Feb 2022 01:00:00 GMT" ), uds_path = ts . Variables . uds_path )
172
172
tr .Processes .Default .ReturnCode = 0
173
173
tr .Processes .Default .Streams .stdout = "gold/range-200.gold"
174
174
175
175
# ATS should respond to Range requests with a 416 error code when the given Range is invalid
176
176
tr = Test .AddTestRun ()
177
- tr .MakeCurlCommand (curl_range (ts , start = 100 , end = 105 ))
177
+ tr .MakeCurlCommand (curl_range (ts , start = 100 , end = 105 ), uds_path = ts . Variables . uds_path )
178
178
tr .Processes .Default .ReturnCode = 0
179
179
tr .Processes .Default .Streams .stdout = "gold/range-416.gold"
180
180
181
181
# ATS should ignore the Range header when given an If-Range header with the incorrect etag
182
182
tr = Test .AddTestRun ()
183
- tr .MakeCurlCommand (curl_range (ts , ifrange = '"should-not-match"' ))
183
+ tr .MakeCurlCommand (curl_range (ts , ifrange = '"should-not-match"' ), uds_path = ts . Variables . uds_path )
184
184
tr .Processes .Default .ReturnCode = 0
185
185
tr .Processes .Default .Streams .stdout = "gold/range-200.gold"
186
186
187
187
# ATS should ignore the Range header when given an If-Range header with weak etags
188
188
tr = Test .AddTestRun ()
189
- tr .MakeCurlCommand (curl_range (ts , ifrange = 'W/"range"' ))
189
+ tr .MakeCurlCommand (curl_range (ts , ifrange = 'W/"range"' ), uds_path = ts . Variables . uds_path )
190
190
tr .Processes .Default .ReturnCode = 0
191
191
tr .Processes .Default .Streams .stdout = "gold/range-200.gold"
192
192
193
193
# ATS should ignore the Range header when given an If-Range header with a date older than the
194
194
# Last-Modified header of the cached response
195
195
tr = Test .AddTestRun ()
196
- tr .MakeCurlCommand (curl_range (ts , ifrange = "Wed, 09 Feb 2022 23:00:00 GMT" ))
196
+ tr .MakeCurlCommand (curl_range (ts , ifrange = "Wed, 09 Feb 2022 23:00:00 GMT" ), uds_path = ts . Variables . uds_path )
197
197
tr .Processes .Default .ReturnCode = 0
198
198
tr .Processes .Default .Streams .stdout = "gold/range-200.gold"
199
199
200
200
# Write to the cache by requesting the entire content
201
201
tr = Test .AddTestRun ()
202
- tr .MakeCurlCommand (curl_whole (ts , path = "short" ))
202
+ tr .MakeCurlCommand (curl_whole (ts , path = "short" ), uds_path = ts . Variables . uds_path )
203
203
tr .Processes .Default .ReturnCode = 0
204
204
tr .Processes .Default .Streams .stdout = "gold/range-200.gold"
205
205
206
206
# ATS should respond to range requests with partial content for stale caches in response to
207
207
# valid If-Range requests if the origin responds with 304 Not Modified.
208
208
tr = Test .AddTestRun ()
209
- tr .MakeCurlCommandMulti (f"sleep { 2 * CACHE_SHORT_MAXAGE } ; {{curl}} " + curl_range (ts , path = "short" , ifrange = '"range"' ))
209
+ tr .MakeCurlCommandMulti (
210
+ f"sleep { 2 * CACHE_SHORT_MAXAGE } ; {{curl}} " + curl_range (ts , path = "short" , ifrange = '"range"' ), uds_path = ts .Variables .uds_path )
210
211
tr .Processes .Default .ReturnCode = 0
211
212
tr .Processes .Default .Streams .stdout = "gold/range-206-revalidated.gold"
212
213
0 commit comments