runner

package
v1.3.29 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentTestDir

func CurrentTestDir() string

func Get

func Get(url string) *http.Response

func GetAppURL

func GetAppURL(appName string) string

func GetRequestedState

func GetRequestedState(appName string) string

func MustHaveEnv

func MustHaveEnv(keyname string) string

func Post

func Post(url string, contentType string, body io.Reader) *http.Response

func RandomStringNumber

func RandomStringNumber() string

func RunCommand

func RunCommand(cmd string, args ...string) *gexec.Session

func RunCommandAndRetry

func RunCommandAndRetry(cmd string, retries int, args ...string) *gexec.Session

func RunCommandSuccessfully

func RunCommandSuccessfully(cmd string, args ...string) *gexec.Session

func RunCommandSuccessfullySilently

func RunCommandSuccessfullySilently(cmd string, args ...string) *gexec.Session

func RunCommandSuccessfullyWithFailureMessage

func RunCommandSuccessfullyWithFailureMessage(commandDescription, cmd string, args ...string) *gexec.Session

func RunCommandWithFailureMessage

func RunCommandWithFailureMessage(commandDescription string, cmd string, args ...string) *gexec.Session

func RunDisasterRecoveryAcceptanceTests

func RunDisasterRecoveryAcceptanceTests(config Config, testCases []TestCase)

func StatusCode

func StatusCode(rawURL string) func() (int, error)

Types

type AppStatusResponse

type AppStatusResponse map[string]InstanceStatusResponse

type BoshConfig

type BoshConfig struct {
	BoshURL          string `json:"bosh_environment"`
	BoshClient       string `json:"bosh_client"`
	BoshClientSecret string `json:"bosh_client_secret"`
	BoshCaCert       string `json:"bosh_ca_cert"`
}

type CloudFoundryConfig

type CloudFoundryConfig struct {
	Name                              string `json:"cf_deployment_name"`
	APIURL                            string `json:"cf_api_url"`
	AdminUsername                     string `json:"cf_admin_username"`
	AdminPassword                     string `json:"cf_admin_password"`
	CredHubClient                     string `json:"credhub_client_name"`
	CredHubSecret                     string `json:"credhub_client_secret"`
	NFSServiceName                    string `json:"nfs_service_name,omitempty"`
	NFSPlanName                       string `json:"nfs_plan_name,omitempty"`
	NFSCreateServiceBroker            bool   `json:"nfs_create_service_broker,omitempty"`
	NFSBrokerUser                     string `json:"nfs_broker_user,omitempty"`
	NFSBrokerPassword                 string `json:"nfs_broker_password,omitempty"`
	NFSBrokerURL                      string `json:"nfs_broker_url,omitempty"`
	SelectiveBackup                   bool   `json:"selective_backup,omitempty"`
	SelectiveBackupType               string `json:"selective_backup_type,omitempty"`
	SMBServiceName                    string `json:"smb_service_name,omitempty"`
	SMBPlanName                       string `json:"smb_plan_name,omitempty"`
	SMBCreateServiceBroker            bool   `json:"smb_create_service_broker,omitempty"`
	SMBBrokerUser                     string `json:"smb_broker_user,omitempty"`
	SMBBrokerPassword                 string `json:"smb_broker_password,omitempty"`
	SMBBrokerURL                      string `json:"smb_broker_url,omitempty"`
	NotificationsTemplateClientID     string
	NotificationsTemplateClientSecret string
}

type Config

type Config struct {
	CloudFoundryConfig
	BoshConfig
	Timeout             time.Duration
	DeleteAndRedeployCF bool `json:"delete_and_redeploy_cf"`
}

type InstanceStatusResponse

type InstanceStatusResponse struct {
	State string
}

type IntegrationConfigTestCaseFilter

type IntegrationConfigTestCaseFilter map[string]interface{}

func (IntegrationConfigTestCaseFilter) Filter

func (f IntegrationConfigTestCaseFilter) Filter(testCases []TestCase) []TestCase

type RegexTestCaseFilter

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

func NewRegexTestCaseFilter

func NewRegexTestCaseFilter(focusedSuiteName, skipSuiteName string) RegexTestCaseFilter

func (RegexTestCaseFilter) Filter

func (f RegexTestCaseFilter) Filter(testCases []TestCase) []TestCase

type TestCase

type TestCase interface {
	Name() string
	CheckDeployment(Config)
	BeforeBackup(Config)
	AfterBackup(Config)
	EnsureAfterSelectiveRestore(Config)
	AfterRestore(Config)
	Cleanup(Config)
}

type TestCaseFilter

type TestCaseFilter interface {
	Filter([]TestCase) []TestCase
}

type TestContext

type TestContext struct {
	WorkspaceDir    string
	BinaryPath      string
	CertificatePath string
}

func NewTestContext

func NewTestContext(uniqueTestID string, boshConfig BoshConfig) (*TestContext, error)

func (*TestContext) Cleanup

func (testContext *TestContext) Cleanup()

Jump to

Keyboard shortcuts

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