Skip to content

Commit

Permalink
http: adjust unit test to multirage changes
Browse files Browse the repository at this point in the history
Acked-by: Paul Millar
Target: master, 2.8, 2.7, 2.6
Require-book: no
Require-notes: no
(cherry picked from commit a000a73)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
  • Loading branch information
kofemann committed Mar 14, 2014
1 parent d7d8bc0 commit 464ed8c
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -337,23 +337,21 @@ public void shouldDeliverPartialFileIfReceivesRequestWithMultipleRanges()
assertThat(_response, hasHeader(CONTENT_TYPE,
"multipart/byteranges; boundary=\"__AAAAAAAAAAAAAAAA__\""));
assertThat(_response, hasHeader(DIGEST, "adler32=03da0195"));
assertThat(_response, not(hasHeader(CONTENT_LENGTH)));
assertThat(_response, hasHeader(CONTENT_LENGTH, "150"));
assertThat(_response, not(hasHeader(CONTENT_RANGE)));
assertThat(_response, not(hasHeader(CONTENT_DISPOSITION)));

assertThat(_additionalWrites, hasSize(5));
assertThat(_additionalWrites.get(0), isMultipart().
emptyLine().
line("--__AAAAAAAAAAAAAAAA__").
line("Content-Length: 1").
line("Content-Range: bytes 0-0/1024").
emptyLine());
assertThat(_additionalWrites.get(1),
isPartialRead("/path/to/file", 0, 0));
assertThat(_additionalWrites.get(2), isMultipart().
emptyLine().
line("--__AAAAAAAAAAAAAAAA__").
line("Content-Length: 1").
line("Content-Range: bytes 1023-1023/1024").
emptyLine());
assertThat(_additionalWrites.get(3),
Expand Down

0 comments on commit 464ed8c

Please sign in to comment.