Merge pull request #720 from jimmyxian/fix-attach-websocket

bug fix: attach through websocket integration test
This commit is contained in:
Andrea Luzzardi 2015-05-05 20:20:07 -07:00
commit ef1a1077cf
1 changed files with 3 additions and 6 deletions

View File

@ -43,15 +43,13 @@ function teardown() {
}
@test "docker attach through websocket" {
#FIXME: Broken
skip
CLIENT_API_VERSION="v1.17"
start_docker 2
swarm_manage
#create a container
run docker_swarm run -d --name test_container busybox sleep 1000
[ "$status" -eq 0 ]
# test attach-ws api
# jimmyxian/centos7-wssh is an image with websocket CLI(WSSH) wirtten in Nodejs
@ -60,9 +58,8 @@ function teardown() {
URL="ws://${SWARM_HOST}/${CLIENT_API_VERSION}/containers/test_container/attach/ws?stderr=1"
run docker_host run --rm --net=host jimmyxian/centos7-wssh wssh $URL
[ "$status" -eq 0 ]
[ "${#lines[@]}" -eq 2 ]
[[ "${lines[0]}" == *"Session Open"* ]]
[[ "${lines[1]}" == *"Session Closed"* ]]
[[ "${output}" == *"Session Open"* ]]
[[ "${output}" == *"Session Closed"* ]]
}
@test "docker build" {