veyron/services/mounttable/lib: also accept wsh as a protocol for nh port parse
go/vcl/2061 today changed the default server protocol to wsh from tcp, which
among other things broke the mounttable integration test. This change fixes it.
Change-Id: Ib0837a50d9f0523af4e7cc32be8ccd2d88323a34
diff --git a/services/mounttable/lib/neighborhood.go b/services/mounttable/lib/neighborhood.go
index 0f9103e..209e7bd 100644
--- a/services/mounttable/lib/neighborhood.go
+++ b/services/mounttable/lib/neighborhood.go
@@ -49,7 +49,9 @@
if addr == nil {
return 0
}
- if addr.Network() != "tcp" {
+ switch addr.Network() {
+ case "tcp", "tcp4", "tcp6", "wsh", "wsh4", "wsh6":
+ default:
return 0
}
_, pstr, err := net.SplitHostPort(addr.String())
diff --git a/services/mounttable/mounttabled/test.sh b/services/mounttable/mounttabled/test.sh
index 54d8b98..da912c5 100755
--- a/services/mounttable/mounttabled/test.sh
+++ b/services/mounttable/mounttabled/test.sh
@@ -33,7 +33,7 @@
shell::run_server "${shell_test_DEFAULT_SERVER_TIMEOUT}" "${MTLOG}" "${MTLOG}" \
"${VRUN}" "${MOUNTTABLED_BIN}" --veyron.tcp.address=127.0.0.1:0 -vmodule=publisher=2 --neighborhood_name="${NHNAME}" &> /dev/null \
- || shell_test::fail "line ${LINENO}: failed to start mounttabled"
+ || shell_test::fail "line ${LINENO}: failed to start mounttabled: $(cat ${MTLOG})"
shell::timed_wait_for "${shell_test_DEFAULT_MESSAGE_TIMEOUT}" "${MTLOG}" "ipc pub: mount" \
|| shell_test::fail "line ${LINENO}: failed to mount mounttabled"
EP=$(grep "Mount table service at:" "${MTLOG}" | sed -e 's/^.*endpoint: //') \