config

package
v0.52.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var ErrUnknownCfg = errors.New("unknown framework configuration")

ErrUnknownCfg is thrown when the provided config doesn't match anything known, be it in "kind" or the version of it.

View Source
var SupportedDeviceTypes = []string{"ANY", "PHONE", "TABLET"}

SupportedDeviceTypes contains the list of supported device types.

Functions

func IsSupportedDeviceType added in v0.52.0

func IsSupportedDeviceType(deviceType string) bool

IsSupportedDeviceType check that the specified deviceType is valid.

func StandardizeVersionFormat

func StandardizeVersionFormat(version string) string

StandardizeVersionFormat remove the leading v in version to ensure reliable comparisons.

Types

type ArtifactDownload added in v0.36.0

type ArtifactDownload struct {
	Match     []string `yaml:"match,omitempty" json:"match"`
	When      When     `yaml:"when,omitempty" json:"when"`
	Directory string   `yaml:"directory,omitempty" json:"directory"`
}

ArtifactDownload represents the test artifacts configuration.

type Artifacts added in v0.36.0

type Artifacts struct {
	Download ArtifactDownload `yaml:"download,omitempty" json:"download"`
}

Artifacts represents the test artifacts configuration.

type Defaults added in v0.37.0

type Defaults struct {
	Mode string `yaml:"mode,omitempty" json:"mode"`
}

Defaults represents default suite settings.

type Device added in v0.36.0

type Device struct {
	ID              string        `yaml:"id,omitempty" json:"id"`
	Name            string        `yaml:"name,omitempty" json:"name"`
	PlatformName    string        `yaml:"platformName,omitempty" json:"platformName"`
	PlatformVersion string        `yaml:"platformVersion,omitempty" json:"platformVersion"`
	Options         DeviceOptions `yaml:"options,omitempty" json:"options,omitempty"`
}

Device represents the RDC device configuration.

type DeviceOptions added in v0.43.0

type DeviceOptions struct {
	CarrierConnectivity bool   `yaml:"carrierConnectivity,omitempty" json:"carrierConnectivity"`
	DeviceType          string `yaml:"deviceType,omitempty" json:"deviceType,omitempty"`
	Private             bool   `yaml:"private,omitempty" json:"private,omitempty"`
}

DeviceOptions represents the devices capabilities required from a real device.

type Docker

type Docker struct {
	FileTransfer DockerFileMode `yaml:"fileTransfer,omitempty" json:"fileTransfer"`
	Image        string         `yaml:"image,omitempty" json:"image"`
}

Docker represents docker settings.

type DockerFileMode

type DockerFileMode string

DockerFileMode represent the file providing method

const (
	DockerFileMount DockerFileMode = "mount"
	DockerFileCopy  DockerFileMode = "copy"
)

DockerFile* represent the different modes

type Emulator added in v0.43.0

type Emulator struct {
	Name             string   `yaml:"name,omitempty" json:"name,omitempty"`
	PlatformName     string   `yaml:"platformName,omitempty" json:"platformName"`
	Orientation      string   `yaml:"orientation,omitempty" json:"orientation,omitempty"`
	PlatformVersions []string `yaml:"platformVersions,omitempty" json:"platformVersions,omitempty"`
}

Emulator represents the emulator configuration.

type Metadata

type Metadata struct {
	Tags  []string `yaml:"tags" json:"tags,omitempty"`
	Build string   `yaml:"build" json:"build"`
}

Metadata describes job metadata

func (*Metadata) ExpandEnv

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{
	Tags:  []string{"$ttag"},
	Build: "Build $tbuild",
}

m.ExpandEnv()

fmt.Println(m)
Output:

{[xp1] Build Bob}

type Npm

type Npm struct {
	Registry  string            `yaml:"registry,omitempty" json:"registry,omitempty"`
	Packages  map[string]string `yaml:"packages,omitempty" json:"packages"`
	StrictSSL bool              `yaml:"strictSSL,omitempty" json:"strictSSL"`
}

Npm represents the npm settings

type SauceConfig

type SauceConfig struct {
	Region      string            `yaml:"region,omitempty" json:"region"`
	Metadata    Metadata          `yaml:"metadata,omitempty" json:"metadata"`
	Tunnel      Tunnel            `yaml:"tunnel,omitempty" json:"tunnel,omitempty"`
	Concurrency int               `yaml:"concurrency,omitempty" json:"concurrency,omitempty"`
	Sauceignore string            `yaml:"sauceignore,omitempty" json:"sauceignore,omitempty"`
	Experiments map[string]string `yaml:"experiments,omitempty" json:"experiments,omitempty"`
}

SauceConfig represents sauce labs related settings.

type Simulator added in v0.49.0

type Simulator Emulator

Simulator represents the simulator configuration.

type Tunnel

type Tunnel struct {
	ID     string `yaml:"id,omitempty" json:"id"`
	Parent string `yaml:"parent,omitempty" json:"parent,omitempty"`
}

Tunnel represents a sauce labs tunnel.

type TypeDef

type TypeDef struct {
	APIVersion string `yaml:"apiVersion,omitempty"`
	Kind       string `yaml:"kind,omitempty"`
}

TypeDef represents the type definition of the config.

func Describe

func Describe(cfgPath string) (TypeDef, error)

Describe returns a description of the given config that is cfgPath.

type When added in v0.48.3

type When string

When represents a conditional status for when artifacts should be downloaded.

const (
	WhenFail   When = "fail"
	WhenPass   When = "pass"
	WhenNever  When = "never"
	WhenAlways When = "always"
)

These conditions indicate when artifacts are to be downloaded.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL