Documentation ¶
Index ¶
- Variables
- func AutoDiscoverAndTest(t *gotest.T)
- func WithAdditionalResources(rscs ...string) krmtOption
- func WithBuildDir(buildDir string) krmtOption
- func WithDir(dir string) krmtOption
- func WithLogger(logger *logger.Logger) krmtOption
- func WithName(name string) krmtOption
- func WithSetters(setters map[string]string) krmtOption
- func WithTimeout(timeout string) krmtOption
- func WithUpdateCommit(commit string) krmtOption
- func WithUpdatePkgs(update bool) krmtOption
- type KRMBlueprintTest
- func (b *KRMBlueprintTest) Apply(assert *assert.Assertions)
- func (b *KRMBlueprintTest) DefaultApply(assert *assert.Assertions)
- func (b *KRMBlueprintTest) DefaultInit(assert *assert.Assertions)
- func (b *KRMBlueprintTest) DefaultTeardown(assert *assert.Assertions)
- func (b *KRMBlueprintTest) DefaultVerify(assert *assert.Assertions)
- func (b *KRMBlueprintTest) DefineApply(apply func(*assert.Assertions))
- func (b *KRMBlueprintTest) DefineInit(init func(*assert.Assertions))
- func (b *KRMBlueprintTest) DefineTeardown(teardown func(*assert.Assertions))
- func (b *KRMBlueprintTest) DefineVerify(verify func(*assert.Assertions))
- func (b *KRMBlueprintTest) GetBuildDir() string
- func (b *KRMBlueprintTest) Init(assert *assert.Assertions)
- func (b *KRMBlueprintTest) ShouldSkip() bool
- func (b *KRMBlueprintTest) Teardown(assert *assert.Assertions)
- func (b *KRMBlueprintTest) Test()
- func (b *KRMBlueprintTest) Verify(assert *assert.Assertions)
Constants ¶
This section is empty.
Variables ¶
var CommonSetters = []string{"PROJECT_ID", "BILLING_ACCOUNT_ID", "ORG_ID"}
Functions ¶
func AutoDiscoverAndTest ¶
AutoDiscoverAndTest discovers KRM config from examples/fixtures and runs tests.
func WithAdditionalResources ¶
func WithAdditionalResources(rscs ...string) krmtOption
func WithBuildDir ¶
func WithBuildDir(buildDir string) krmtOption
func WithLogger ¶
func WithSetters ¶
func WithTimeout ¶
func WithTimeout(timeout string) krmtOption
func WithUpdateCommit ¶
func WithUpdateCommit(commit string) krmtOption
func WithUpdatePkgs ¶
func WithUpdatePkgs(update bool) krmtOption
Types ¶
type KRMBlueprintTest ¶
type KRMBlueprintTest struct { discovery.BlueprintTestConfig // additional blueprint test configs // contains filtered or unexported fields }
KRMBlueprintTest implements bpt.Blueprint and stores information associated with a KRM blueprint test.
func NewKRMBlueprintTest ¶
func NewKRMBlueprintTest(t testing.TB, opts ...krmtOption) *KRMBlueprintTest
NewKRMBlueprintTest sets defaults, validates and returns a KRMBlueprintTest.
func (*KRMBlueprintTest) Apply ¶
func (b *KRMBlueprintTest) Apply(assert *assert.Assertions)
Apply runs the default or custom apply function for the blueprint.
func (*KRMBlueprintTest) DefaultApply ¶
func (b *KRMBlueprintTest) DefaultApply(assert *assert.Assertions)
DefaultApply installs resource-group, initializes inventory, applies pkg and polls resource statuses until current.
func (*KRMBlueprintTest) DefaultInit ¶
func (b *KRMBlueprintTest) DefaultInit(assert *assert.Assertions)
DefaultInit sets up build directory, updates pkg, upserts setters and renders config.
func (*KRMBlueprintTest) DefaultTeardown ¶
func (b *KRMBlueprintTest) DefaultTeardown(assert *assert.Assertions)
DefaultTeardown destroys resources from cluster and polls until deleted.
func (*KRMBlueprintTest) DefaultVerify ¶
func (b *KRMBlueprintTest) DefaultVerify(assert *assert.Assertions)
DefaultVerify asserts all resources are status successful
func (*KRMBlueprintTest) DefineApply ¶
func (b *KRMBlueprintTest) DefineApply(apply func(*assert.Assertions))
DefineApply defines a custom apply function for the blueprint.
func (*KRMBlueprintTest) DefineInit ¶
func (b *KRMBlueprintTest) DefineInit(init func(*assert.Assertions))
DefineInit defines a custom init function for the blueprint.
func (*KRMBlueprintTest) DefineTeardown ¶
func (b *KRMBlueprintTest) DefineTeardown(teardown func(*assert.Assertions))
DefineTeardown defines a custom teardown function for the blueprint.
func (*KRMBlueprintTest) DefineVerify ¶
func (b *KRMBlueprintTest) DefineVerify(verify func(*assert.Assertions))
DefineVerify defines a custom verify function for the blueprint.
func (*KRMBlueprintTest) GetBuildDir ¶
func (b *KRMBlueprintTest) GetBuildDir() string
GetBuildDir returns the temporary build dir created for hydrating config. Defaults to .build/test-name.
func (*KRMBlueprintTest) Init ¶
func (b *KRMBlueprintTest) Init(assert *assert.Assertions)
Init runs the default or custom init function for the blueprint.
func (*KRMBlueprintTest) ShouldSkip ¶
func (b *KRMBlueprintTest) ShouldSkip() bool
ShouldSkip checks if a test should be skipped
func (*KRMBlueprintTest) Teardown ¶
func (b *KRMBlueprintTest) Teardown(assert *assert.Assertions)
Teardown runs the default or custom teardown function for the blueprint.
func (*KRMBlueprintTest) Test ¶
func (b *KRMBlueprintTest) Test()
Test runs init, apply, verify, teardown in order for the blueprint.
func (*KRMBlueprintTest) Verify ¶
func (b *KRMBlueprintTest) Verify(assert *assert.Assertions)
Verify runs the default or custom verify function for the blueprint.