krmt

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommonSetters = []string{"PROJECT_ID", "BILLING_ACCOUNT_ID", "ORG_ID"}

Functions

func AutoDiscoverAndTest

func AutoDiscoverAndTest(t *gotest.T)

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 WithDir

func WithDir(dir string) krmtOption

func WithLogger

func WithLogger(logger *logger.Logger) krmtOption

func WithName

func WithName(name string) krmtOption

func WithSetters

func WithSetters(setters map[string]string) krmtOption

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.

Jump to

Keyboard shortcuts

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