add sharness test for streaming output from daemon
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
Jeromy committed
Oct 21, 2015 at 15:01 UTC
5dc2c7e01085258d880531e038d1fafaf5294111
1 file changed
+11
test/sharness/t0060-daemon.sh
+11
@@ -109,6 +109,17 @@ test_expect_success "transport should be encrypted" '
109
test_fsh cat swarmnc
110
'
111
112
+test_expect_success "output from streaming commands works" '
113
+ test_expect_code 28 curl -m 2 http://localhost:5001/api/v0/stats/bw\?poll=true > statsout
114
+'
115
+
116
+test_expect_success "output looks good" '
117
+ grep TotalIn statsout > /dev/null &&
118
+ grep TotalOut statsout > /dev/null &&
119
+ grep RateIn statsout > /dev/null &&
120
+ grep RateOut statsout >/dev/null
121
+'
122
+
123
# end same as in t0010
124
125
test_expect_success "daemon is still running" '