test: disable the namespace cache unconditionally for context created by V23Init
This allows us to remove a bunch of explicit calls to disabling the cache (most
of which were already unnecessary).
Change-Id: I420e4811788d71ced4561554719e68562e8f6d8c
diff --git a/test/init.go b/test/init.go
index 0dc5cf7..b8b6cc2 100644
--- a/test/init.go
+++ b/test/init.go
@@ -95,6 +95,8 @@
panic(err)
}
}
+ ns := v23.GetNamespace(ctx)
+ ns.CacheCtl(naming.DisableCache(true))
if params.CreateMounttable {
disp, err := mounttablelib.NewMountTableDispatcher(ctx, "", "", "mounttable")
if err != nil {
@@ -104,9 +106,7 @@
if err != nil {
panic(err)
}
- ns := v23.GetNamespace(ctx)
ns.SetRoots(s.Status().Endpoints[0].Name())
- ns.CacheCtl(naming.DisableCache(true))
}
return ctx, shutdown
}