MCPcopy
hub / github.com/weaviate/weaviate / seedNamespace

Function seedNamespace

usecases/namespaces/controller_test.go:36–45  ·  view source on GitHub ↗

seedNamespace creates name and transitions it to seedState. An empty seedState seeds nothing.

(t *testing.T, c *Controller, name string, seedState cmd.NamespaceState)

Source from the content-addressed store, hash-verified

34// seedNamespace creates name and transitions it to seedState. An empty
35// seedState seeds nothing.
36func seedNamespace(t *testing.T, c *Controller, name string, seedState cmd.NamespaceState) {
37 t.Helper()
38 if seedState == "" {
39 return
40 }
41 require.NoError(t, c.Create(cmd.Namespace{Name: name, HomeNodes: []string{"node-1"}}))
42 if seedState == cmd.NamespaceStateDeleting {
43 require.NoError(t, c.ChangeState(name, cmd.NamespaceStateDeleting))
44 }
45}
46
47func TestValidateName(t *testing.T) {
48 tests := []struct {

Callers 2

Calls 2

CreateMethod · 0.65
ChangeStateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…