Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comparer ¶
type Comparer struct {
// contains filtered or unexported fields
}
A Comparer allows comparing query results for test cases between a reference API and a test API.
type PromAPI ¶
type PromAPI interface { // Query performs a query for the given time. Query(ctx context.Context, query string, ts time.Time, opts ...v1.Option) (model.Value, v1.Warnings, error) // QueryRange performs a query for the given range. QueryRange(ctx context.Context, query string, r v1.Range, opts ...v1.Option) (model.Value, v1.Warnings, error) }
PromAPI allows running instant and range queries against a Prometheus-compatible API.
type Result ¶
type Result struct { TestCase *TestCase `json:"testCase"` Diff string `json:"diff,omitempty"` UnexpectedFailure string `json:"unexpectedFailure,omitempty"` UnexpectedSuccess bool `json:"unexpectedSuccess"` Unsupported bool `json:"unsupported,omitempty"` }
Result tracks a single test case's query comparison result.
type TestCase ¶
type TestCase struct { Query string `json:"query"` SkipComparison bool `json:"skipComparison"` ShouldFail bool `json:"shouldFail"` Start time.Time `json:"start"` End time.Time `json:"end"` Resolution time.Duration `json:"resolution"` }
TestCase represents a fully expanded query to be tested.
Click to show internal directories.
Click to hide internal directories.