Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ExampleGraph is an example of a graph specification ExampleGraph = &adagio.GraphSpec{ Nodes: []*adagio.Node_Spec{ a, b, c, d, e, f, g, }, Edges: []*adagio.Edge{ {Source: a.Name, Destination: c.Name}, {Source: a.Name, Destination: d.Name}, {Source: b.Name, Destination: d.Name}, {Source: b.Name, Destination: f.Name}, {Source: c.Name, Destination: e.Name}, {Source: d.Name, Destination: e.Name}, {Source: e.Name, Destination: g.Name}, {Source: f.Name, Destination: g.Name}, }, } )
Functions ¶
func TestHarness ¶
func TestHarness(t *testing.T, repoFn Constructor)
TestHarness is a test suite which a repository must pass in order to be deemed appropriate as an adagio repository.
It runs a number of import scenarios against the repository implementation which include attempts to make concurrent claims, attempts to finish node appropriately, attempts to handle orphaned nodes and so on.
Types ¶
type Constructor ¶
type Constructor func(func() time.Time) (Repository, Orphaner)
Constructor is a function which constructs a repository and orphaner when provded a function which returns a time (now)
type OrphanFunc ¶
OrphanFunc is a function which can be used as an Orphaner
func (OrphanFunc) Orphan ¶
func (o OrphanFunc) Orphan(c *adagio.Claim)
Orphan delegates to the underlying OrphanFunc
type Repository ¶
type Repository interface { controlplane.Repository agent.Repository }
Repository is a combination of the controlplane and agent repository types
type TestLayer ¶
type TestLayer struct { Name string Repository Repository Run *adagio.Run Unclaimable []string Claimable map[string]*adagio.Node Finish map[string]adagio.Node_Result_Conclusion Events []*adagio.Event RunStatus adagio.Run_Status }
TestLayer is used by the TestHarness to run a prebaked scenario of calls (claims and finishes) and expect a state of the world