Documentation
¶
Overview ¶
Package compliance provides the tools to validate the compliance of driver implementations and BQL behavior testing. The compliance package is built around stories. A story is a collection of graphs and a sequence of assertions against the provided data. An assertion is defined by a tuple containing a BQL, the execution status, and the expeted result table.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assertion ¶
type Assertion struct {
// Requires of the assertion.
Requires string
// Statement contains the BQL query to assert.
Statement string
// WillFail indicates if the query should fail with and error.
WillFail bool
// MustReturn contains the table containing the expected results provided
// by the BQL statemnet execution.
MustReturn []map[string]string
// contains filtered or unexported fields
}
Assertion contains a BQL, the expecte status of the BQL query execution, and the returned results table.
type AssertionOutcome ¶
AssertionOutcome contains the result of running one assertion of a given story.
type Graph ¶
type Graph struct {
// ID of the binding name to use for the graph.
ID string
// Facts contains the parseable tribles which define the graph.
Facts []string
}
Graph contains the graph binding name and the list of parseable triples that define it.
type Story ¶
type Story struct {
// Name of the story.
Name string
// Sources contains the list of graphs used in the story.
Sources []*Graph
// Assertions that need to be validated against the provided sources.
Assertions []*Assertion
}
Story contains the available graphs and the collection of assertions to validate.