Documentation ¶
Overview ¶
Package config provides functionality for handling and validating configuration data for test execution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompareResult ¶
type CompareResult struct { ExpectedFail map[string]string ExpectedSkip map[string]string ExpectedPass map[string]string UnexpectedFail map[string]string UnexpectedSkip map[string]string UnexpectedPass map[string]string UnexpectedRest map[string]TestResult Stats Stats }
CompareResult encapsulates the comparison between expected and actual test outcomes.
type Config ¶
type Config struct { Runner RunnerType Dir string // Args contains additional arguments for the test runner. Args []string Results Results }
Config represents the configuration settings for the test execution.
type Results ¶
type Results struct { PostgreSQL *TestConfig SQLite *TestConfig MongoDB *TestConfig }
Results stores the expected test results for different databases.
type RunnerType ¶
type RunnerType string
RunnerType represents the type of test runner used in the configuration.
const ( // RunnerTypeCommand indicates a command-line test runner. RunnerTypeCommand RunnerType = "command" // RunnerTypeGoTest indicates a Go test runner. RunnerTypeGoTest RunnerType = "gotest" // RunnerTypeJSTest indicates a JavaScript test runner. RunnerTypeJSTest RunnerType = "jstest" // RunnerTypeYCSB indicates a YCSB test runner. RunnerTypeYCSB RunnerType = "ycsb" )
type Stats ¶
type Stats struct { UnexpectedFail int UnexpectedSkip int UnexpectedPass int UnexpectedRest int ExpectedFail int ExpectedSkip int ExpectedPass int }
Stats represent the expected/actual amount of failed, skipped and passed tests. The ordering is significant and ordering improves readability, so please maintain it.
type TestConfig ¶
type TestConfig struct { Default Status Stats *Stats Fail Tests Skip Tests Pass Tests Ignore Tests }
TestConfig represents the configuration for tests categorized by status and regular expressions.
func (*TestConfig) Compare ¶
func (tc *TestConfig) Compare(results *TestResults) (*CompareResult, error)
Compare compares two *TestResults and returns a *CompareResult containing the differences.
type TestResult ¶
TestResult represents the outcome of a single test.
func (*TestResult) IndentedOutput ¶
func (tr *TestResult) IndentedOutput() string
IndentedOutput returns the output of a test result with indented lines.
type TestResults ¶
type TestResults struct { // Test results by full test name. TestResults map[string]TestResult }
TestResults represents the collection of results from multiple tests.