Fix errors due changed sockRequest signature

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov 2015-04-13 10:30:07 -07:00
parent 9a0a4ac02f
commit 27fccdbabb
2 changed files with 10 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package main
import (
"net/http"
"os/exec"
"strings"
"testing"
@ -16,10 +17,13 @@ func TestExecResizeApiHeightWidthNoInt(t *testing.T) {
cleanedContainerID := strings.TrimSpace(out)
endpoint := "/exec/" + cleanedContainerID + "/resize?h=foo&w=bar"
_, err = sockRequest("POST", endpoint, nil)
status, _, err := sockRequest("POST", endpoint, nil)
if err == nil {
t.Fatal("Expected exec resize Request to fail")
}
if status != http.StatusInternalServerError {
t.Fatalf("Status expected %d, got %d", http.StatusInternalServerError, status)
}
logDone("container exec resize - height, width no int fail")
}

View File

@ -1,6 +1,7 @@
package main
import (
"net/http"
"os/exec"
"strings"
"testing"
@ -34,10 +35,13 @@ func TestResizeApiHeightWidthNoInt(t *testing.T) {
cleanedContainerID := strings.TrimSpace(out)
endpoint := "/containers/" + cleanedContainerID + "/resize?h=foo&w=bar"
_, err = sockRequest("POST", endpoint, nil)
status, _, err := sockRequest("POST", endpoint, nil)
if err == nil {
t.Fatal("Expected resize Request to fail")
}
if status != http.StatusInternalServerError {
t.Fatalf("Status expected %d, got %d", http.StatusInternalServerError, status)
}
logDone("container resize - height, width no int fail")
}