##// END OF EJS Templates
tests: add a substitution pattern for dates in HTTP headers and LFS payload...
Matt Harbison -
r36942:03368431 default
parent child Browse files
Show More
@@ -72,6 +72,14 b' substitutions = ['
72 72 (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "(GET|PUT|POST)',
73 73 lambda m: br' - - [$LOGDATE$] "' + m.group(1)
74 74 ),
75 # HTTP header dates- RFC 1123
76 (br'Date: [A-Za-z]{3}, \d\d [A-Za-z]{3} \d{4} \d\d:\d\d:\d\d GMT',
77 br'Date: $HTTP_DATE$'
78 ),
79 # LFS expiration value
80 (br'"expires_at": "\d{4}-\d\d-\d\dT\d\d:\d\d:\d\dZ"',
81 br'"expires_at": "$ISO_8601_DATE_TIME$"'
82 ),
75 83 # Windows has an extra '/' in the following lines that get globbed away:
76 84 # pushing to file:/*/$TESTTMP/r2 (glob)
77 85 # comparing with file:/*/$TESTTMP/r2 (glob)
@@ -116,7 +116,7 b' Failure on subsequent HTTP request on th'
116 116 readline(4? from -1) -> (2) \r\n (glob)
117 117 write(36) -> HTTP/1.1 200 Script output follows\r\n
118 118 write(23) -> Server: badhttpserver\r\n
119 write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
119 write(37) -> Date: $HTTP_DATE$\r\n
120 120 write(41) -> Content-Type: application/mercurial-0.1\r\n
121 121 write(21) -> Content-Length: 417\r\n
122 122 write(2) -> \r\n
@@ -157,7 +157,7 b' Failure to read getbundle HTTP request'
157 157 readline(13? from -1) -> (2) \r\n (glob)
158 158 write(36) -> HTTP/1.1 200 Script output follows\r\n
159 159 write(23) -> Server: badhttpserver\r\n
160 write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
160 write(37) -> Date: $HTTP_DATE$\r\n
161 161 write(41) -> Content-Type: application/mercurial-0.1\r\n
162 162 write(21) -> Content-Length: 417\r\n
163 163 write(2) -> \r\n
@@ -179,7 +179,7 b' Failure to read getbundle HTTP request'
179 179 readline(2? from -1) -> (2) \r\n (glob)
180 180 write(36) -> HTTP/1.1 200 Script output follows\r\n
181 181 write(23) -> Server: badhttpserver\r\n
182 write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
182 write(37) -> Date: $HTTP_DATE$\r\n
183 183 write(41) -> Content-Type: application/mercurial-0.1\r\n
184 184 write(20) -> Content-Length: 42\r\n
185 185 write(2) -> \r\n
@@ -214,7 +214,7 b' Now do a variation using POST to send ar'
214 214 readline(14? from -1) -> (2) \r\n (glob)
215 215 write(36) -> HTTP/1.1 200 Script output follows\r\n
216 216 write(23) -> Server: badhttpserver\r\n
217 write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
217 write(37) -> Date: $HTTP_DATE$\r\n
218 218 write(41) -> Content-Type: application/mercurial-0.1\r\n
219 219 write(21) -> Content-Length: 430\r\n
220 220 write(2) -> \r\n
@@ -290,7 +290,7 b' Server sends an incomplete capabilities '
290 290 readline(-1) -> (2) \r\n
291 291 write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n
292 292 write(23 from 23) -> (121) Server: badhttpserver\r\n
293 write(37 from 37) -> (84) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
293 write(37 from 37) -> (84) Date: $HTTP_DATE$\r\n
294 294 write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n
295 295 write(21 from 21) -> (22) Content-Length: 417\r\n
296 296 write(2 from 2) -> (20) \r\n
@@ -325,7 +325,7 b' TODO this output is horrible'
325 325 readline(-1) -> (2) \r\n
326 326 write(36 from 36) -> (659) HTTP/1.1 200 Script output follows\r\n
327 327 write(23 from 23) -> (636) Server: badhttpserver\r\n
328 write(37 from 37) -> (599) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
328 write(37 from 37) -> (599) Date: $HTTP_DATE$\r\n
329 329 write(41 from 41) -> (558) Content-Type: application/mercurial-0.1\r\n
330 330 write(21 from 21) -> (537) Content-Length: 417\r\n
331 331 write(2 from 2) -> (535) \r\n
@@ -341,7 +341,7 b' TODO this output is horrible'
341 341 readline(-1) -> (2) \r\n
342 342 write(36 from 36) -> (82) HTTP/1.1 200 Script output follows\r\n
343 343 write(23 from 23) -> (59) Server: badhttpserver\r\n
344 write(37 from 37) -> (22) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
344 write(37 from 37) -> (22) Date: $HTTP_DATE$\r\n
345 345 write(22 from 41) -> (0) Content-Type: applicat
346 346 write limit reached; closing socket
347 347 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
@@ -373,7 +373,7 b' TODO client spews a stack due to uncaugh'
373 373 readline(-1) -> (2) \r\n
374 374 write(36 from 36) -> (724) HTTP/1.1 200 Script output follows\r\n
375 375 write(23 from 23) -> (701) Server: badhttpserver\r\n
376 write(37 from 37) -> (664) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
376 write(37 from 37) -> (664) Date: $HTTP_DATE$\r\n
377 377 write(41 from 41) -> (623) Content-Type: application/mercurial-0.1\r\n
378 378 write(21 from 21) -> (602) Content-Length: 417\r\n
379 379 write(2 from 2) -> (600) \r\n
@@ -389,7 +389,7 b' TODO client spews a stack due to uncaugh'
389 389 readline(-1) -> (2) \r\n
390 390 write(36 from 36) -> (147) HTTP/1.1 200 Script output follows\r\n
391 391 write(23 from 23) -> (124) Server: badhttpserver\r\n
392 write(37 from 37) -> (87) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
392 write(37 from 37) -> (87) Date: $HTTP_DATE$\r\n
393 393 write(41 from 41) -> (46) Content-Type: application/mercurial-0.1\r\n
394 394 write(20 from 20) -> (26) Content-Length: 42\r\n
395 395 write(2 from 2) -> (24) \r\n
@@ -425,7 +425,7 b' TODO this output is terrible'
425 425 readline(-1) -> (2) \r\n
426 426 write(36 from 36) -> (871) HTTP/1.1 200 Script output follows\r\n
427 427 write(23 from 23) -> (848) Server: badhttpserver\r\n
428 write(37 from 37) -> (811) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
428 write(37 from 37) -> (811) Date: $HTTP_DATE$\r\n
429 429 write(41 from 41) -> (770) Content-Type: application/mercurial-0.1\r\n
430 430 write(21 from 21) -> (749) Content-Length: 417\r\n
431 431 write(2 from 2) -> (747) \r\n
@@ -441,7 +441,7 b' TODO this output is terrible'
441 441 readline(-1) -> (2) \r\n
442 442 write(36 from 36) -> (294) HTTP/1.1 200 Script output follows\r\n
443 443 write(23 from 23) -> (271) Server: badhttpserver\r\n
444 write(37 from 37) -> (234) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
444 write(37 from 37) -> (234) Date: $HTTP_DATE$\r\n
445 445 write(41 from 41) -> (193) Content-Type: application/mercurial-0.1\r\n
446 446 write(20 from 20) -> (173) Content-Length: 42\r\n
447 447 write(2 from 2) -> (171) \r\n
@@ -457,7 +457,7 b' TODO this output is terrible'
457 457 readline(-1) -> (2) \r\n
458 458 write(36 from 36) -> (93) HTTP/1.1 200 Script output follows\r\n
459 459 write(23 from 23) -> (70) Server: badhttpserver\r\n
460 write(37 from 37) -> (33) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
460 write(37 from 37) -> (33) Date: $HTTP_DATE$\r\n
461 461 write(33 from 41) -> (0) Content-Type: application/mercuri
462 462 write limit reached; closing socket
463 463 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
@@ -486,7 +486,7 b' Server sends empty HTTP body for getbund'
486 486 readline(-1) -> (2) \r\n
487 487 write(36 from 36) -> (909) HTTP/1.1 200 Script output follows\r\n
488 488 write(23 from 23) -> (886) Server: badhttpserver\r\n
489 write(37 from 37) -> (849) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
489 write(37 from 37) -> (849) Date: $HTTP_DATE$\r\n
490 490 write(41 from 41) -> (808) Content-Type: application/mercurial-0.1\r\n
491 491 write(21 from 21) -> (787) Content-Length: 417\r\n
492 492 write(2 from 2) -> (785) \r\n
@@ -502,7 +502,7 b' Server sends empty HTTP body for getbund'
502 502 readline(-1) -> (2) \r\n
503 503 write(36 from 36) -> (332) HTTP/1.1 200 Script output follows\r\n
504 504 write(23 from 23) -> (309) Server: badhttpserver\r\n
505 write(37 from 37) -> (272) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
505 write(37 from 37) -> (272) Date: $HTTP_DATE$\r\n
506 506 write(41 from 41) -> (231) Content-Type: application/mercurial-0.1\r\n
507 507 write(20 from 20) -> (211) Content-Length: 42\r\n
508 508 write(2 from 2) -> (209) \r\n
@@ -518,7 +518,7 b' Server sends empty HTTP body for getbund'
518 518 readline(-1) -> (2) \r\n
519 519 write(36 from 36) -> (131) HTTP/1.1 200 Script output follows\r\n
520 520 write(23 from 23) -> (108) Server: badhttpserver\r\n
521 write(37 from 37) -> (71) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
521 write(37 from 37) -> (71) Date: $HTTP_DATE$\r\n
522 522 write(41 from 41) -> (30) Content-Type: application/mercurial-0.2\r\n
523 523 write(28 from 28) -> (2) Transfer-Encoding: chunked\r\n
524 524 write(2 from 2) -> (0) \r\n
@@ -549,7 +549,7 b' Server sends partial compression string'
549 549 readline(-1) -> (2) \r\n
550 550 write(36 from 36) -> (933) HTTP/1.1 200 Script output follows\r\n
551 551 write(23 from 23) -> (910) Server: badhttpserver\r\n
552 write(37 from 37) -> (873) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
552 write(37 from 37) -> (873) Date: $HTTP_DATE$\r\n
553 553 write(41 from 41) -> (832) Content-Type: application/mercurial-0.1\r\n
554 554 write(21 from 21) -> (811) Content-Length: 417\r\n
555 555 write(2 from 2) -> (809) \r\n
@@ -565,7 +565,7 b' Server sends partial compression string'
565 565 readline(-1) -> (2) \r\n
566 566 write(36 from 36) -> (356) HTTP/1.1 200 Script output follows\r\n
567 567 write(23 from 23) -> (333) Server: badhttpserver\r\n
568 write(37 from 37) -> (296) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
568 write(37 from 37) -> (296) Date: $HTTP_DATE$\r\n
569 569 write(41 from 41) -> (255) Content-Type: application/mercurial-0.1\r\n
570 570 write(20 from 20) -> (235) Content-Length: 42\r\n
571 571 write(2 from 2) -> (233) \r\n
@@ -581,7 +581,7 b' Server sends partial compression string'
581 581 readline(-1) -> (2) \r\n
582 582 write(36 from 36) -> (155) HTTP/1.1 200 Script output follows\r\n
583 583 write(23 from 23) -> (132) Server: badhttpserver\r\n
584 write(37 from 37) -> (95) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
584 write(37 from 37) -> (95) Date: $HTTP_DATE$\r\n
585 585 write(41 from 41) -> (54) Content-Type: application/mercurial-0.2\r\n
586 586 write(28 from 28) -> (26) Transfer-Encoding: chunked\r\n
587 587 write(2 from 2) -> (24) \r\n
General Comments 0
You need to be logged in to leave comments. Login now