mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
docker_api_attach_test: fix WS test to use DOCKER_TEST_HOST if specified
TestGetContainersAttachWebsocket is currently broken on Windows CI tests b/c it has hardcoded unix://var/run/docker.sock. This change makes use of @icecrime's code in docker_utils and generalizes it with sockConn() to provide a net.Conn by making use of DOCKER_TEST_HOST. Also fixes the test. Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
parent
d8f60a6cf7
commit
ac6cb41d52
2 changed files with 22 additions and 18 deletions
|
@ -2,9 +2,9 @@ package main
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"net"
|
||||
"os/exec"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"code.google.com/p/go.net/websocket"
|
||||
)
|
||||
|
@ -17,7 +17,7 @@ func TestGetContainersAttachWebsocket(t *testing.T) {
|
|||
}
|
||||
defer deleteAllContainers()
|
||||
|
||||
rwc, err := net.Dial("unix", "/var/run/docker.sock")
|
||||
rwc, err := sockConn(time.Duration(10 * time.Second))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue