seedNamespace creates name and transitions it to seedState. An empty seedState seeds nothing.
(t *testing.T, c *Controller, name string, seedState cmd.NamespaceState)
| 34 | // seedNamespace creates name and transitions it to seedState. An empty |
| 35 | // seedState seeds nothing. |
| 36 | func 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 | |
| 47 | func TestValidateName(t *testing.T) { |
| 48 | tests := []struct { |
no test coverage detected
searching dependent graphs…