Fix errors due changed sockRequest signature
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
9a0a4ac02f
commit
27fccdbabb
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue