Documentation ¶
Overview ¶
Package querytest contains utilities for testing the query end-to-end.
Index ¶
- func NewQueryTestHelper(t *testing.T, tc NewQueryTestCase)
- func OperationMarshalingTestHelper(t *testing.T, data []byte, expOp *flux.Operation)
- func ReplaceOpInSpec(q *flux.Spec, replaceFn ReplaceOpInSpecFunction)
- func RunAndCheckResult(t testing.TB, querier *Querier, c flux.Compiler, d flux.Dialect, want string)
- type NewQueryTestCase
- type Querier
- type ReplaceOpInSpecFunction
- type ReplaceSpecCompiler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQueryTestHelper ¶
func NewQueryTestHelper(t *testing.T, tc NewQueryTestCase)
func ReplaceOpInSpec ¶ added in v0.18.0
func ReplaceOpInSpec(q *flux.Spec, replaceFn ReplaceOpInSpecFunction)
Types ¶
type NewQueryTestCase ¶
type Querier ¶
type Querier struct {
C *controltest.Controller
}
func NewQuerier ¶
func NewQuerier() *Querier
type ReplaceOpInSpecFunction ¶ added in v0.18.0
type ReplaceOpInSpecFunction func(op *flux.Operation) flux.OperationSpec
ReplaceOpInSpecFunction is a function that takes an Operation and returns a new OperationSpec for substitution, or nil, if nothing has to be changed.
type ReplaceSpecCompiler ¶ added in v0.18.0
func NewReplaceSpecCompiler ¶ added in v0.18.0
func NewReplaceSpecCompiler(compiler flux.Compiler, fn ReplaceOpInSpecFunction) *ReplaceSpecCompiler
Click to show internal directories.
Click to hide internal directories.