summaryrefslogtreecommitdiff
path: root/integration-cli/docker_api_attach_test.go
diff options
context:
space:
mode:
authorAhmet Alp Balkan <ahmetalpbalkan@gmail.com>2015-02-12 11:51:28 -0800
committerAhmet Alp Balkan <ahmetalpbalkan@gmail.com>2015-02-12 15:11:19 -0800
commitac6cb41d52ca229d2b628ab0bb5ef6103bd86ce1 (patch)
tree44ac485e81fc67474af9396a71035cd97cbfd6c6 /integration-cli/docker_api_attach_test.go
parentd8f60a6cf7790b8951fdb1c5af2ca2aef5353ec6 (diff)
downloaddocker-ac6cb41d52ca229d2b628ab0bb5ef6103bd86ce1.tar.gz
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>
Diffstat (limited to 'integration-cli/docker_api_attach_test.go')
-rw-r--r--integration-cli/docker_api_attach_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go
index 191060dded..b16a7bb2f0 100644
--- a/integration-cli/docker_api_attach_test.go
+++ b/integration-cli/docker_api_attach_test.go
@@ -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)
}