MCPcopy
hub / github.com/weaviate/weaviate / fakeNamespacesExister

Struct fakeNamespacesExister

usecases/schema/namespace_create_test.go:39–42  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
39type fakeNamespacesExister struct {
40 byName map[string]cmd.Namespace
41 defaultHomeNode string
42}
43
44func (f fakeNamespacesExister) Exists(name string) bool {
45 if _, ok := f.byName[name]; ok {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected