Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶ added in v0.4.2
type Capabilities struct { BrowserName string `yaml:"browserName"` BrowserVersion string `yaml:"browserVersion"` PlatformName string `yaml:"platformName"` AcceptInsecureCerts bool `yaml:"acceptInsecureCerts"` PageLoadStrategy bool `yaml:"pageLoadStrategy"` Proxy map[string]interface{} `yaml:"proxy"` SetWindowRect bool `yaml:"setWindowRect"` Timeouts Timeouts `yaml:"timeouts"` StrictFileInteractability bool `yaml:"strictFileInteractability"` UnhandledPromptBehavior string `yaml:"unhandledPromptBehavior"` }
Capabilities describes job capabilies
type ImageDefinition ¶
type ImageDefinition struct { Base string `yaml:"base"` Version string `yaml:"version"` Exec string `yaml:"exec"` Options map[string]interface{} `yaml:"options"` }
ImageDefinition describe configuration to the testrunner image
type JobConfiguration ¶
type JobConfiguration struct { APIVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` Metadata Metadata `yaml:"metadata"` Capabilities []Capabilities `yaml:"capabilities"` Files []string `yaml:"files"` Image ImageDefinition `yaml:"image"` Timeout int `yaml:"timeout"` Sauce SauceConfig `yaml:"sauce"` Env map[string]string `yaml:"env"` }
JobConfiguration describes testrunner config format
func NewJobConfiguration ¶
func NewJobConfiguration(cfgFilePath string) (JobConfiguration, error)
NewJobConfiguration creates a new job configuration based on a config file
type Metadata ¶
type Metadata struct { Name string `yaml:"name"` Tags []string `yaml:"tags"` Build string `yaml:"build"` }
Metadata describes job metadata
func (*Metadata) ExpandEnv ¶ added in v0.9.1
func (m *Metadata) ExpandEnv()
ExpandEnv expands environment variables inside metadata fields.
Example ¶
os.Setenv("tname", "Envy") os.Setenv("ttag", "xp1") os.Setenv("tbuild", "Bob") m := Metadata{ Name: "Test $tname", Tags: []string{"$ttag"}, Build: "Build $tbuild", } m.ExpandEnv() fmt.Println(m)
Output: {Test Envy [xp1] Build Bob}
type RunnerConfiguration ¶
type RunnerConfiguration struct { RootDir string `yaml:"rootDir"` TargetDir string `yaml:"targetDir"` ExecCommand []string `yaml:"execCommand"` }
RunnerConfiguration describes configurations for the testrunner
func NewRunnerConfiguration ¶
func NewRunnerConfiguration(cfgFilePath string) (RunnerConfiguration, error)
NewRunnerConfiguration reads yaml file for runner configurations
type SauceConfig ¶ added in v0.8.0
type SauceConfig struct {
Region string `yaml:"region"`
}
SauceConfig represents sauce labs related settings.
Click to show internal directories.
Click to hide internal directories.