@cryptotaxi247 / kubo / commits / 56b6a2069

sharness: gateway fixes

there's an odd error setting the config.

Juan Batiz-Benet committed Feb 1, 2015 at 08:31 UTC 56b6a2069aae63f1655d192b1282c1eba16f9e9b
3 files changed +10 -9
test/sharness/lib/test-lib.sh
+8 -7
@@ -118,14 +118,14 @@ test_init_ipfs() {
118
119 test_config_ipfs_gateway_readonly() {
120 test_expect_success "prepare config -- gateway readonly" '
121 - ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/5002
121 + ipfs config "Addresses.Gateway" "/ip4/0.0.0.0/tcp/5002"
122 '
123 }
124
125 test_config_ipfs_gateway_writable() {
126 test_expect_success "prepare config -- gateway writable" '
127 - ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/5002 &&
128 - ipfs config -bool Gateway.Writable true
127 + ipfs config "Addresses.Gateway" "/ip4/0.0.0.0/tcp/5002" &&
128 + ipfs config -bool "Gateway.Writable" true
129 '
130 }
131
@@ -146,22 +146,23 @@ test_launch_ipfs_daemon() {
146 # and we make sure there are no errors
147 test_expect_success "'ipfs daemon' is ready" '
148 IPFS_PID=$! &&
149 - test_wait_output_n_lines_60_sec actual_daemon $NLINES &&
150 - printf "" >empty && test_cmp daemon_err empty ||
149 + test_wait_output_n_lines_60_sec actual_daemon $NLINES ||
150 fsh cat actual_daemon || fsh cat daemon_err
151 '
152
153 test_expect_success "'ipfs daemon' output includes API address" '
154 cat actual_daemon | grep "API server listening on $ADDR_API" ||
155 fsh cat actual_daemon ||
157 - fsh "cat actual_daemon | grep \"API server listening on $ADDR_API\""
156 + fsh "cat actual_daemon | grep \"API server listening on $ADDR_API\"" ||
157 + fsh cat daemon_err
158 '
159
160 if test "$ADDR_GWAY" != ""; then
161 test_expect_success "'ipfs daemon' output includes Gateway address" '
162 cat actual_daemon | grep "Gateway server listening on $ADDR_GWAY" ||
163 fsh cat actual_daemon ||
164 - fsh "cat actual_daemon | grep \"Gateway server listening on $ADDR_GWAY\""
164 + fsh "cat actual_daemon | grep \"Gateway server listening on $ADDR_GWAY\"" ||
165 + fsh cat daemon_err
166 '
167 fi
168 }
test/sharness/t0110-gateway.sh
+1 -1
@@ -4,7 +4,7 @@
4 # MIT Licensed; see the LICENSE file in this repository.
5 #
6
7 -test_description="Test HTTP gateway"
7 +test_description="Test HTTP Gateway"
8
9 . lib/test-lib.sh
10
test/sharness/t0111-gateway-writable.sh
+1 -1
@@ -4,7 +4,7 @@
4 # MIT Licensed; see the LICENSE file in this repository.
5 #
6
7 -test_description="Test HTTP Gateway"
7 +test_description="Test HTTP Gateway (Writable)"
8
9 . lib/test-lib.sh
10