X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6c31bea91f136bb300376847ced1fd965e037dd3..3bef97ac46da8f5a7c322ec31c6bba4affb8ad80:/services/keepstore/handler_test.go diff --git a/services/keepstore/handler_test.go b/services/keepstore/handler_test.go index ba923cad76..3817ea1900 100644 --- a/services/keepstore/handler_test.go +++ b/services/keepstore/handler_test.go @@ -954,3 +954,19 @@ func TestGetHandlerNoBufferleak(t *testing.T) { case <-ok: } } + +func TestPutReplicationHeader(t *testing.T) { + defer teardown() + + KeepVM = MakeTestVolumeManager(2) + defer KeepVM.Close() + + resp := IssueRequest(&RequestTester{ + method: "PUT", + uri: "/" + TestHash, + requestBody: TestBlock, + }) + if r := resp.Header().Get("X-Keep-Replicas-Stored"); r != "1" { + t.Errorf("Got X-Keep-Replicas-Stored: %q, expected %q", r, "1") + } +}