MCPcopy
hub / github.com/SpecterOps/BloodHound / assertGraphKinds

Function assertGraphKinds

packages/go/analysis/agt_test.go:293–300  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

291// with the underlying pg driver's schema manager so that subsequent graph
292// transactions referencing those kinds can be translated.
293func 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

Callers 1

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected