Documentation ¶
Overview ¶
Package brokerpaktestframework implements a test framework that can be used by brokerpaks for testing
Index ¶
- func FindService(catalog *apiresponses.CatalogResponse, s string) domain.Service
- func FindServicePlan(catalog *apiresponses.CatalogResponse, serviceName, servicePlan string) domain.ServicePlan
- func FindServicePlanGUIDs(catalog *apiresponses.CatalogResponse, serviceName, planName string) (string, string, error)
- func PathToBrokerPack(skips ...int) string
- type Option
- type TFStateValue
- type TerraformInvocation
- type TerraformMock
- func (p TerraformMock) ApplyInvocations() ([]TerraformInvocation, error)
- func (p TerraformMock) FirstTerraformInvocationVars() (map[string]any, error)
- func (p TerraformMock) Invocations() ([]TerraformInvocation, error)
- func (p TerraformMock) Reset() error
- func (p TerraformMock) ReturnTFState(values []TFStateValue) error
- func (p TerraformMock) SetTFState(values []TFStateValue) error
- type TestInstance
- func (instance *TestInstance) Bind(serviceName, planName, instanceID string, params map[string]any) (map[string]any, error)
- func (instance *TestInstance) Catalog() (*apiresponses.CatalogResponse, error)
- func (instance *TestInstance) Cleanup() error
- func (instance *TestInstance) Provision(serviceName string, planName string, params map[string]any) (string, error)
- func (instance *TestInstance) Start(logger io.Writer, config []string) error
- func (instance *TestInstance) Update(instanceGUID string, serviceName string, planName string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindService ¶
func FindService(catalog *apiresponses.CatalogResponse, s string) domain.Service
func FindServicePlan ¶
func FindServicePlan(catalog *apiresponses.CatalogResponse, serviceName, servicePlan string) domain.ServicePlan
func FindServicePlanGUIDs ¶
func FindServicePlanGUIDs(catalog *apiresponses.CatalogResponse, serviceName, planName string) (string, string, error)
func PathToBrokerPack ¶
Types ¶
type TFStateValue ¶
type TerraformInvocation ¶
type TerraformInvocation struct { Type string // contains filtered or unexported fields }
type TerraformMock ¶
type TerraformMock struct { Binary string Version string // contains filtered or unexported fields }
func NewTerraformMock ¶
func NewTerraformMock(opts ...Option) (TerraformMock, error)
func (TerraformMock) ApplyInvocations ¶
func (p TerraformMock) ApplyInvocations() ([]TerraformInvocation, error)
func (TerraformMock) FirstTerraformInvocationVars ¶
func (p TerraformMock) FirstTerraformInvocationVars() (map[string]any, error)
func (TerraformMock) Invocations ¶
func (p TerraformMock) Invocations() ([]TerraformInvocation, error)
func (TerraformMock) Reset ¶
func (p TerraformMock) Reset() error
func (TerraformMock) ReturnTFState ¶
func (p TerraformMock) ReturnTFState(values []TFStateValue) error
ReturnTFState set the Terraform State in a JSON file. Deprecated: due to the introduction of a new name that provides a more accurate meaning. We use parallel change to not break backwards compatibility. To set the Terraform State use the TerraformMock.SetTFState method.
func (TerraformMock) SetTFState ¶ added in v0.11.0
func (p TerraformMock) SetTFState(values []TFStateValue) error
SetTFState set the Terraform State in a JSON file.
type TestInstance ¶
type TestInstance struct {
// contains filtered or unexported fields
}
func BuildTestInstance ¶
func BuildTestInstance(brokerPackDir string, provider TerraformMock, logger io.Writer, brokerpakExtraFoldersToCopy ...string) (*TestInstance, error)
func (*TestInstance) Catalog ¶
func (instance *TestInstance) Catalog() (*apiresponses.CatalogResponse, error)
func (*TestInstance) Cleanup ¶
func (instance *TestInstance) Cleanup() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.