Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Suite ¶
type Suite interface { GetTests() []runtime.TestCase GetTestByTitle(title string) (runtime.TestCase, error) GetGlobalConfig() runtime.TestConfig }
Suite represents the current tests and configs
type YAMLConfig ¶
type YAMLConfig struct { Tests map[string]YAMLTest `yaml:"tests"` Config YAMLTestConfig `yaml:"config,omitempty"` }
YAMLConfig will be used for unmarshalling the yaml test suite
func (YAMLConfig) MarshalYAML ¶ added in v1.2.1
func (y YAMLConfig) MarshalYAML() (interface{}, error)
MarshalYAML adds custom logic to the struct to yaml conversion
func (*YAMLConfig) UnmarshalYAML ¶
func (y *YAMLConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML unmarshals the yaml
type YAMLSuite ¶
type YAMLSuite struct { TestCases []runtime.TestCase Config runtime.TestConfig }
YAMLSuite represents a test suite which was configured in yaml
func (YAMLSuite) GetGlobalConfig ¶
func (s YAMLSuite) GetGlobalConfig() runtime.TestConfig
GetGlobalConfig returns the global suite configuration
func (YAMLSuite) GetTestByTitle ¶
GetTestByTitle returns the first test it finds for the given title
type YAMLTest ¶
type YAMLTest struct { Title string `yaml:"-"` Command string `yaml:"command,omitempty"` ExitCode int `yaml:"exit-code"` Stdout interface{} `yaml:"stdout,omitempty"` Stderr interface{} `yaml:"stderr,omitempty"` Config YAMLTestConfig `yaml:"config,omitempty"` }
YAMLTest represents a test in the yaml test suite
type YAMLTestConfig ¶
type YAMLTestConfig struct { InheritEnv bool `yaml:"inherit-env,omitempty"` Env map[string]string `yaml:"env,omitempty"` Dir string `yaml:"dir,omitempty"` Timeout string `yaml:"timeout,omitempty"` Retries int `yaml:"retries,omitempty"` Interval string `yaml:"interval,omitempty"` }
YAMLTestConfig is a struct to represent the test config
Click to show internal directories.
Click to hide internal directories.