Documentation
¶
Overview ¶
Package config provides project configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompareResults ¶
type CompareResults struct {
// expected
Failed map[string]TestResult
Skipped map[string]TestResult
Passed map[string]TestResult
// unexpected
XFailed map[string]TestResult
XSkipped map[string]TestResult
XPassed map[string]TestResult
Unknown map[string]TestResult
Stats Stats
}
CompareResults represents the comparison between expected and actual test outcomes.
type Config ¶
type Config struct {
Runner RunnerType
Params RunnerParams
Results *ExpectedResults
}
Config represents project configuration.
type ExpectedResults ¶
type ExpectedResults struct {
Default Status
Stats *Stats
// test names
Fail []string
Skip []string
Pass []string
Ignore []string
}
ExpectedResults represents expected results for specific database.
func (*ExpectedResults) Compare ¶
func (expected *ExpectedResults) Compare(actual map[string]TestResult) (*CompareResults, error)
Compare compares expected and actual results.
type RunnerParams ¶
type RunnerParams interface {
// contains filtered or unexported methods
}
RunnerParams is common interface for runner parameters.
type RunnerParamsCommand ¶
type RunnerParamsCommand struct {
Dir string
Setup string
Teardown string
Tests []RunnerParamsCommandTest
}
RunnerParamsCommand represents `command` runner parameters.
type RunnerParamsCommandTest ¶
RunnerParamsCommandTest represents a single test in `command` runner parameters.
type RunnerParamsGoTest ¶
RunnerParamsGoTest represents `gotest` runner parameters.
type RunnerParamsYCSB ¶
RunnerParamsYCSB represents `ycsb` runner parameters.
type RunnerType ¶
type RunnerType string
RunnerType represents the type of test runner used in the project configuration.
const ( // RunnerTypeCommand indicates a command-line test runner. RunnerTypeCommand RunnerType = "command" // RunnerTypeGoTest indicates a Go test runner. RunnerTypeGoTest RunnerType = "gotest" // RunnerTypeYCSB indicates a YCSB test runner. RunnerTypeYCSB RunnerType = "ycsb" )
type Stats ¶
type Stats struct {
Failed int
Skipped int
Passed int
XFailed int
XSkipped int
XPassed int
Unknown int
}
Stats represent expected or actual fail/skip/pass statistics for specific database.
type TestResult ¶
TestResult represents the actual outcome of a single test.
func (*TestResult) IndentedOutput ¶
func (tr *TestResult) IndentedOutput() string
IndentedOutput returns the output of a test result with indented lines.