helpers

package
v0.0.0-...-9019959 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2014 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CF_API_TIMEOUT = 30 * time.Second
View Source
const CURL_TIMEOUT = 10 * time.Second

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"`
	AppsDomain  string `json:"apps_domain"`

	AdminUser     string `json:"admin_user"`
	AdminPassword string `json:"admin_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"`

	ArtifactsDirectory string `json:"artifacts_directory"`
}

func LoadConfig

func LoadConfig() Config

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) RegularUserContext

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

func (*ConfiguredContext) Setup

func (context *ConfiguredContext) Setup()

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()

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

Jump to

Keyboard shortcuts

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