File tree Expand file tree Collapse file tree 2 files changed +41
-2
lines changed Expand file tree Collapse file tree 2 files changed +41
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"remote_urls" : {
3
- "echo.localhost:8008" : " ws://localhost:9009 " ,
4
- "cobra.localhost:8008" : " ws://localhost:8765 "
3
+ "echo.localhost:8008" : " ws://localhost:8009 " ,
4
+ "cobra.localhost:8008" : " ws://localhost:5678 "
5
5
}
6
6
}
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # This test requires cobra to be available
4
+ which cobra > /dev/null || {
5
+ echo cobra is not installed on this machine.
6
+ exit 0
7
+ }
8
+
9
+ # Handle Ctrl-C by killing all sub-processing AND exiting
10
+ trap cleanup INT
11
+
12
+ function cleanup {
13
+ exit_code=${1:- 1}
14
+ echo " Killing all servers (ws and cobra)"
15
+ echo
16
+ kill ` cat /tmp/pidfile.proxy` & > /dev/null
17
+ kill ` cat /tmp/pidfile.echo_server` & > /dev/null
18
+ kill ` cat /tmp/pidfile.cobra` & > /dev/null
19
+ kill ` cat /tmp/pidfile.connect.echo` & > /dev/null
20
+ kill ` cat /tmp/pidfile.connect.cobra` & > /dev/null
21
+ exit ${exit_code}
22
+ }
23
+
24
+ ws proxy_server --pidfile /tmp/pidfile.proxy --config_path proxyConfig.json &
25
+ ws echo_server --pidfile /tmp/pidfile.echo_server --port 8009 &
26
+ cobra -v run --pidfile /tmp/pidfile.cobra --port 5678 &
27
+
28
+ # Wait for the servers to be up
29
+ sleep 1
30
+
31
+ # unbuffer comes with expect (written in tcl)
32
+ echo ' hello' | unbuffer ws connect --pidfile /tmp/pidfile.connect.echo ws://echo.localhost:8008 &
33
+
34
+ echo ' hello' | unbuffer ws connect --pidfile /tmp/pidfile.connect.cobra ws://cobra.localhost:8008 &
35
+
36
+ # Wait
37
+ sleep 2
38
+
39
+ cleanup
You can’t perform that action at this time.
0 commit comments