Test overlapping resume

This commit is contained in:
Felix Geisendörfer 2013-05-08 16:02:33 +02:00
parent faf8cc6f44
commit 4c10bea894
1 changed files with 24 additions and 0 deletions

View File

@ -200,6 +200,30 @@ var Protocol_Core_Tests = []struct {
},
},
},
{
Description: "Overlapping Resume",
FinalLength: 11,
ExpectFileContent: "hello world",
Requests: []TestRequest{
{
Method: "PATCH",
Headers: map[string]string{"Offset": "0"},
Body: "hello wo",
ExpectStatusCode: http.StatusOK,
},
{
Method: "HEAD",
ExpectStatusCode: http.StatusOK,
ExpectHeaders: map[string]string{"Offset": "8"},
},
{
Method: "PATCH",
Headers: map[string]string{"Offset": "5"},
Body: " world",
ExpectStatusCode: http.StatusOK,
},
},
},
{
Description: "Offset exceeded",
FinalLength: 5,