assertGraphKinds registers any dynamic kinds (e.g. asset group tag kinds) with the underlying pg driver's schema manager so that subsequent graph transactions referencing those kinds can be translated.
(ctx context.Context, graphDB graph.Database, kinds graph.Kinds)
| 291 | // with the underlying pg driver's schema manager so that subsequent graph |
| 292 | // transactions referencing those kinds can be translated. |
| 293 | func assertGraphKinds(ctx context.Context, graphDB graph.Database, kinds graph.Kinds) error { |
| 294 | driver, ok := graphDB.(*pg.Driver) |
| 295 | if !ok { |
| 296 | return fmt.Errorf("graph database is not a pg driver") |
| 297 | } |
| 298 | _, err := driver.KindMapper().AssertKinds(ctx, kinds) |
| 299 | return err |
| 300 | } |
| 301 | |
| 302 | // TestTagAssetGroupNodesForTag exercises tagAssetGroupNodesForTag end-to-end |
| 303 | // and guards against regressions |
no test coverage detected