Documentation ¶
Index ¶
- type Config
- func (c *Config) GetKubeConfig() string
- func (c *Config) GetSSHKeyPath() string
- func (c *Config) IsDCOS() bool
- func (c *Config) IsKubernetes() bool
- func (c *Config) IsOpenShift() bool
- func (c *Config) IsSwarm() bool
- func (c *Config) IsSwarmMode() bool
- func (c *Config) ReadPublicSSHKey() (string, error)
- func (c *Config) SetEnvVars() error
- func (c *Config) SetKubeConfig()
- func (c *Config) SetRandomRegion()
- func (c *Config) SetSSHKeyPermissions() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SkipTest bool `envconfig:"SKIP_TEST" default:"false"` SkipLogsCollection bool `envconfig:"SKIP_LOGS_COLLECTION" default:"false"` Orchestrator string `envconfig:"ORCHESTRATOR" default:"kubernetes"` Name string `envconfig:"NAME"` // Name allows you to set the name of a cluster already created Location string `envconfig:"LOCATION"` // Location where you want to create the cluster Regions []string `envconfig:"REGIONS"` // A whitelist of availableregions ClusterDefinition string `envconfig:"CLUSTER_DEFINITION" required:"true" default:"examples/kubernetes.json"` // ClusterDefinition is the path on disk to the json template these are normally located in examples/ CleanUpOnExit bool `envconfig:"CLEANUP_ON_EXIT" default:"true"` // if set the tests will not clean up rgs when tests finish CleanUpIfFail bool `envconfig:"CLEANUP_IF_FAIL" default:"true"` RetainSSH bool `envconfig:"RETAIN_SSH" default:"true"` StabilityIterations int `envconfig:"STABILITY_ITERATIONS"` Timeout time.Duration `envconfig:"TIMEOUT" default:"10m"` CurrentWorkingDir string SoakClusterName string `envconfig:"SOAK_CLUSTER_NAME"` ForceDeploy bool `envconfig:"FORCE_DEPLOY"` UseDeployCommand bool `envconfig:"USE_DEPLOY_COMMAND"` GinkgoFocus string `envconfig:"GINKGO_FOCUS"` GinkgoSkip string `envconfig:"GINKGO_SKIP"` }
Config holds global test configuration
func ParseConfig ¶
ParseConfig will parse needed environment variables for running the tests
func (*Config) GetKubeConfig ¶
GetKubeConfig returns the absolute path to the kubeconfig for c.Location
func (*Config) GetSSHKeyPath ¶
GetSSHKeyPath will return the absolute path to the ssh private key
func (*Config) IsDCOS ¶ added in v0.7.0
IsDCOS will return true if the ORCHESTRATOR env var is set to dcos
func (*Config) IsKubernetes ¶ added in v0.7.0
IsKubernetes will return true if the ORCHESTRATOR env var is set to kubernetes or not set at all
func (*Config) IsOpenShift ¶ added in v0.17.0
IsOpenShift will return true if the ORCHESTRATOR env var is set to openshift
func (*Config) IsSwarm ¶ added in v0.7.0
IsSwarm will return true if the ORCHESTRATOR env var is set to dcos
func (*Config) IsSwarmMode ¶ added in v0.7.0
IsSwarmMode will return true if the ORCHESTRATOR env var is set to dcos
func (*Config) ReadPublicSSHKey ¶
ReadPublicSSHKey will read the contents of the public ssh key on disk into a string
func (*Config) SetEnvVars ¶ added in v0.7.0
SetEnvVars will determine if we need to
func (*Config) SetKubeConfig ¶ added in v0.9.4
func (c *Config) SetKubeConfig()
SetKubeConfig will set the KUBECONIFG env var
func (*Config) SetRandomRegion ¶ added in v0.9.0
func (c *Config) SetRandomRegion()
SetRandomRegion sets Location to a random region
func (*Config) SetSSHKeyPermissions ¶ added in v0.16.0
SetSSHKeyPermissions will change the ssh file permission to 0600