testutils

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddonsImagesetDir added in v0.3.0

func AddonsImagesetDir() string

func AddonsIndexImageDir added in v0.3.0

func AddonsIndexImageDir() string

func DefaultSucceedingCandidates added in v0.6.0

func DefaultSucceedingCandidates() ([]types.MetaBundle, error)

DefaultSucceedingCandidates - returns a slice of valid metaBundles that are supposed to pass all validators successfully. If it is not the case, please make the required adjustments.

func GetReferenceAddonStage added in v0.6.0

func GetReferenceAddonStage() (*singleton, error)

GetReferenceAddonStage - uses singleton pattern to avoid loading yaml manifests over and over currently supports: - (DEPRECATED) static indexImage reference-addon - imageSet reference-addon

func GetStringLiteralRef added in v0.6.0

func GetStringLiteralRef(s string) *string

func NewBundle added in v0.7.0

func NewBundle(name string, yamlFilePaths ...string) (registry.Bundle, error)

func RemoveDir added in v0.6.0

func RemoveDir(downloadDir string)

func RootDir

func RootDir() string

func TestdataDir

func TestdataDir() string

func YamlToDynamicObj added in v0.7.0

func YamlToDynamicObj(yamlPath string) (unstructured.Unstructured, error)

Types

type MockOCMClient added in v0.8.0

type MockOCMClient struct {
	// contains filtered or unexported fields
}

MockOCMClient satisfies the types.OCMClient interface and is used to test validators interacting with OCM.

func NewMockOCMClient added in v0.8.0

func NewMockOCMClient(opts ...MockOCMClientOption) *MockOCMClient

NewMockOCMClient returns a *MockOCMClient configured with the supplied options.

func (*MockOCMClient) CloseConnection added in v0.8.0

func (m *MockOCMClient) CloseConnection() error

func (*MockOCMClient) GetSKURules added in v0.8.0

func (m *MockOCMClient) GetSKURules(ctx context.Context, ocmQuotaName string) ([]*amv1.SkuRule, error)

func (*MockOCMClient) Option added in v0.8.0

func (c *MockOCMClient) Option(opt MockOCMClientOption)

Option applies the provided MockOCMClientOption to a MockOCMClientInstance

type MockOCMClientOption added in v0.8.0

type MockOCMClientOption func(c *MockOCMClient)

func MockOCMClientValidQuotaNames added in v0.8.0

func MockOCMClientValidQuotaNames(names ...string) MockOCMClientOption

MockOCMClientValidQuotaNames populates the MockOCMClient instance with a list of dummy ocmQuotaNames that are guaranteed to return a SKU Rule.

Jump to

Keyboard shortcuts

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