v.io: use test.V23Init instead of v23.Init in test code
test.V23Init creates a context that's suitable for tests, including a
test blessing and no prod mounttable root. Using test.V23Init everywhere
in tests gives us a choke-point for adding test-specific configuration
of the runtime and context.
Change-Id: Ibd78f23206ead96ce036fafb99a7bc394e6dd983
diff --git a/go/src/v.io/x/playground/testdata/src/ping/ping.go b/go/src/v.io/x/playground/testdata/src/ping/ping.go
index b942d96..abdb005 100644
--- a/go/src/v.io/x/playground/testdata/src/ping/ping.go
+++ b/go/src/v.io/x/playground/testdata/src/ping/ping.go
@@ -9,15 +9,15 @@
import (
"fmt"
- "v.io/v23"
"v.io/x/lib/vlog"
_ "v.io/x/ref/runtime/factories/generic"
+ "v.io/x/ref/test"
"pingpong"
)
func main() {
- ctx, shutdown := v23.Init()
+ ctx, shutdown := test.V23Init()
defer shutdown()
s := pingpong.PingPongClient("pingpong")
diff --git a/go/src/v.io/x/playground/testdata/src/pong/pong.go b/go/src/v.io/x/playground/testdata/src/pong/pong.go
index 60bd5d9..b00e92c 100644
--- a/go/src/v.io/x/playground/testdata/src/pong/pong.go
+++ b/go/src/v.io/x/playground/testdata/src/pong/pong.go
@@ -16,6 +16,7 @@
"v.io/x/lib/vlog"
"v.io/x/ref/lib/signals"
_ "v.io/x/ref/runtime/factories/generic"
+ "v.io/x/ref/test"
"pingpong"
)
@@ -29,7 +30,7 @@
}
func main() {
- ctx, shutdown := v23.Init()
+ ctx, shutdown := test.V23Init()
defer shutdown()
serverPong := pingpong.PingPongServer(&pongd{})