testutil

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCRDByName

func GetCRDByName(
	t *testing.T,
	m *ackmodel.Model,
	name string,
) *model.CRD

GetCRDByName returns a CRD model with the supplied name

func GetTypeDefByName added in v0.2.0

func GetTypeDefByName(
	t *testing.T,
	m *ackmodel.Model,
	name string,
) *model.TypeDef

GetTypeDefByName returns a TypeDef model with the supplied name

func NewModelForService added in v0.5.0

func NewModelForService(t *testing.T, servicePackageName string) *ackmodel.Model

NewModelForService returns a new *ackmodel.Model used for testing purposes.

func NewModelForServiceWithOptions added in v0.6.0

func NewModelForServiceWithOptions(t *testing.T, servicePackageName string, options *TestingModelOptions) *ackmodel.Model

NewModelForServiceWithOptions returns a new *ackmodel.Model used for testing purposes.

Types

type TestingModelOptions added in v0.6.0

type TestingModelOptions struct {
	// The CR API Version. Defaults to v1alpha1
	APIVersion string
	// The generator config file. Defaults to generator.yaml
	GeneratorConfigFile string
	// The documentation config file. No default value
	DocumentationConfigFile string
	// The AWS Service's API version. Defaults to 00-00-0000
	ServiceAPIVersion string
}

TestingModelOptions contains optional variables that are passed to `NewModelForServiceWithOptions`.

func (*TestingModelOptions) SetDefaults added in v0.6.0

func (o *TestingModelOptions) SetDefaults()

SetDefaults sets the empty fields to a default value.

Jump to

Keyboard shortcuts

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