Fix tests for renegotiation

This commit is contained in:
Wojciech Tyczynski
2016-05-11 09:50:47 +02:00
parent e48116bb75
commit 5d046fed41
29 changed files with 199 additions and 143 deletions

View File

@@ -141,7 +141,7 @@ func TestAttach(t *testing.T) {
switch p, m := req.URL.Path, req.Method; {
case p == test.podPath && m == "GET":
body := objBody(codec, test.pod)
return &http.Response{StatusCode: 200, Body: body}, nil
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: body}, nil
default:
// Ensures no GET is performed when deleting by name
t.Errorf("%s: unexpected request: %s %#v\n%#v", test.name, req.Method, req.URL, req)
@@ -219,7 +219,7 @@ func TestAttachWarnings(t *testing.T) {
switch p, m := req.URL.Path, req.Method; {
case p == test.podPath && m == "GET":
body := objBody(codec, test.pod)
return &http.Response{StatusCode: 200, Body: body}, nil
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: body}, nil
default:
t.Errorf("%s: unexpected request: %s %#v\n%#v", test.name, req.Method, req.URL, req)
return nil, fmt.Errorf("unexpected request")