initial commit
[chaz/docker-connect] / t / 02-socket-errors.sh
1 #!/bin/sh
2
3 . ./unittest.sh
4 . ./tap.sh
5
6 plan 3
7
8 make_socket "$socket"
9
10 DOCKER_CONNECT_HOSTNAME=foo ./docker-connect -qqq foo
11 is "$?" 2 'socket already exists and environment is configured'
12
13 ./docker-connect -qqq foo
14 is "$?" 3 'socket already exists'
15
16 rm -f "$socket"
17
18 cat <<'MOCK' >"$SSH"
19 #!/bin/sh
20 exit 1
21 MOCK
22 chmod +x "$SSH"
23
24 ./docker-connect -qqq foo
25 is "$?" 5 'socket connection error'
26
This page took 0.037275 seconds and 4 git commands to generate.