seedEntity writes an entity directly into the store so tests don't depend on commands that are no longer exposed (like the old "add" subcommand).
(t *testing.T, kind entities.Kind, name, content, description string)
| 12 | // seedEntity writes an entity directly into the store so tests don't depend on |
| 13 | // commands that are no longer exposed (like the old "add" subcommand). |
| 14 | func seedEntity(t *testing.T, kind entities.Kind, name, content, description string) { |
| 15 | t.Helper() |
| 16 | store := entities.NewStore(kind) |
| 17 | if err := store.Put(entities.Entity{ |
| 18 | Name: name, |
| 19 | Content: content, |
| 20 | Description: description, |
| 21 | }); err != nil { |
| 22 | t.Fatalf("seedEntity: %v", err) |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | // installEntityToApp installs an entity directly into an app directory for |
| 27 | // testing the list command's installed-scan behavior. |
no test coverage detected