fakeNamespacesExister implements [namespaces.Exister] for tests that only need to seed a known namespace->home_node mapping. defaultHomeNode is the HomeNode returned for any name not in byName; setting it lets tests that don't care about per-namespace placement reuse this fake without seeding.
| 37 | // HomeNode returned for any name not in byName; setting it lets tests that |
| 38 | // don't care about per-namespace placement reuse this fake without seeding. |
| 39 | type fakeNamespacesExister struct { |
| 40 | byName map[string]cmd.Namespace |
| 41 | defaultHomeNode string |
| 42 | } |
| 43 | |
| 44 | func (f fakeNamespacesExister) Exists(name string) bool { |
| 45 | if _, ok := f.byName[name]; ok { |
nothing calls this directly
no outgoing calls
no test coverage detected