cmd_test_helpers

package
v1.3.1119 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FakeChartmusuem is the url for the fake chart museum used in tests
	FakeChartmusuem = "http://fake.chartmuseum"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppTestOptions

type AppTestOptions struct {
	ConfigureGitFn  environments.ConfigureGitFn
	CommonOptions   *opts.CommonOptions
	FakeGitProvider *gits.FakeProvider
	DevRepo         *gits.FakeRepository
	DevEnvRepo      *gits.FakeRepository
	OrgName         string
	DevEnvRepoInfo  *gits.GitRepository
	DevEnv          *jenkinsv1.Environment
	MockHelmer      *helm_test.MockHelmer
	MockFactory     *cmd_test.MockFactory
	MockVaultClient *vault_test.MockClient
}

AppTestOptions contains all useful data from the test environment initialized by `prepareInitialPromotionEnv`

func CreateAppTestOptions

func CreateAppTestOptions(gitOps bool, t *testing.T) *AppTestOptions

CreateAppTestOptions configures the mock environment for running apps related tests

func (*AppTestOptions) Cleanup

func (o *AppTestOptions) Cleanup() error

Cleanup must be run in a defer statement whenever CreateAppTestOptions is run

func (*AppTestOptions) DirectlyAddAppToGitOps added in v1.3.913

func (o *AppTestOptions) DirectlyAddAppToGitOps(values map[string]interface{}) (name string, alias string,
	version string, err error)

DirectlyAddAppToGitOps modifies the environment git repo directly to add a dummy app

func (*AppTestOptions) GetFullDevEnvDir added in v1.3.942

func (o *AppTestOptions) GetFullDevEnvDir(envDir string) (name string)

GetFullDevEnvDir returns a dev environment including org name and env

Jump to

Keyboard shortcuts

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