helpers

package
v0.0.0-...-bc175e6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CURL_TIMEOUT = 30 * time.Second
View Source
const RUNAWAY_QUOTA_MEM_LIMIT = "99999G"

Variables

This section is empty.

Functions

func AppRootUri

func AppRootUri(appName string) string

Gets an app's root endpoint

func AppUri

func AppUri(appName, path string) string

Gets an app's endpoint with the specified path

func CurlApp

func CurlApp(appName, path string) string

Curls an app's endpoint and exit successfully before the default timeout

func CurlAppRoot

func CurlAppRoot(appName string) string

Curls an app's root endpoint and exit successfully before the default timeout

func CurlAppWithTimeout

func CurlAppWithTimeout(appName, path string, timeout time.Duration) string

Curls an app's endpoint and exit successfully before the specified timeout

func CurlingAppRoot

func CurlingAppRoot(appName string) func() string

Returns a function that curls an app's root endpoint and exit successfully before the default timeout

func EnableCFTrace

func EnableCFTrace(config Config, componentName string)

func NewJUnitReporter

func NewJUnitReporter(config Config, componentName string) *reporters.JUnitReporter

Types

type Config

type Config struct {
	ApiEndpoint   string `json:"api"`
	SystemDomain  string `json:"system_domain"`
	OauthPassword string `json:"oauth_password"`
	AppsDomain    string `json:"apps_domain"`

	AdminUser     string `json:"admin_user"`
	AdminPassword string `json:"admin_password"`

	UseExistingUser      bool   `json:"use_existing_user"`
	ShouldKeepUser       bool   `json:"keep_user_at_suite_end"`
	ExistingUser         string `json:"existing_user"`
	ExistingUserPassword string `json:"existing_user_password"`

	PersistentAppHost      string `json:"persistent_app_host"`
	PersistentAppSpace     string `json:"persistent_app_space"`
	PersistentAppOrg       string `json:"persistent_app_org"`
	PersistentAppQuotaName string `json:"persistent_app_quota_name"`

	SkipSSLValidation bool `json:"skip_ssl_validation"`
	UseDiego          bool `json:"use_diego"`

	ArtifactsDirectory string `json:"artifacts_directory"`

	DefaultTimeout     time.Duration `json:"default_timeout"`
	CfPushTimeout      time.Duration `json:"cf_push_timeout"`
	LongCurlTimeout    time.Duration `json:"long_curl_timeout"`
	BrokerStartTimeout time.Duration `json:"broker_start_timeout"`

	TimeoutScale float64 `json:"timeout_scale"`

	SyslogDrainPort int    `json:"syslog_drain_port"`
	SyslogIpAddress string `json:"syslog_ip_address"`

	SecureAddress string `json:"secure_address"`

	DockerExecutable      string   `json:"docker_executable"`
	DockerParameters      []string `json:"docker_parameters"`
	DockerRegistryAddress string   `json:"docker_registry_address"`
	DockerPrivateImage    string   `json:"docker_private_image"`
	DockerUser            string   `json:"docker_user"`
	DockerPassword        string   `json:"docker_password"`
	DockerEmail           string   `json:"docker_email"`
}

func LoadConfig

func LoadConfig() Config

func (Config) ScaledTimeout

func (c Config) ScaledTimeout(timeout time.Duration) time.Duration

type ConfiguredContext

type ConfiguredContext struct {
	// contains filtered or unexported fields
}

func NewContext

func NewContext(config Config) *ConfiguredContext

func NewPersistentAppContext

func NewPersistentAppContext(config Config) *ConfiguredContext

func (*ConfiguredContext) AdminUserContext

func (context *ConfiguredContext) AdminUserContext() cf.UserContext

func (ConfiguredContext) LongTimeout

func (context ConfiguredContext) LongTimeout() time.Duration

func (*ConfiguredContext) RegularUserContext

func (context *ConfiguredContext) RegularUserContext() cf.UserContext

func (*ConfiguredContext) SetRunawayQuota

func (context *ConfiguredContext) SetRunawayQuota()

func (*ConfiguredContext) Setup

func (context *ConfiguredContext) Setup()

func (ConfiguredContext) ShortTimeout

func (context ConfiguredContext) ShortTimeout() time.Duration

func (*ConfiguredContext) Teardown

func (context *ConfiguredContext) Teardown()

type Environment

type Environment struct {
	// contains filtered or unexported fields
}

func NewEnvironment

func NewEnvironment(context SuiteContext) *Environment

func (*Environment) Setup

func (e *Environment) Setup()

func (*Environment) Teardown

func (e *Environment) Teardown()

type SuiteContext

type SuiteContext interface {
	Setup()
	Teardown()
	SetRunawayQuota()

	AdminUserContext() cf.UserContext
	RegularUserContext() cf.UserContext

	ShortTimeout() time.Duration
	LongTimeout() time.Duration
}

Jump to

Keyboard shortcuts

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