Documentation ¶
Index ¶
- func DefaultValidBundleMap() (map[string]types.MetaBundle, error)
- type MockOCMClient
- type MockQuayClient
- type ValidatorTester
- func (v *ValidatorTester) Option(opt ValidatorTesterOption)
- func (v *ValidatorTester) TestInvalidBundles(bundles map[string]types.MetaBundle)
- func (v *ValidatorTester) TestSingleBundle(mb types.MetaBundle) validator.Result
- func (v *ValidatorTester) TestValidBundles(bundles map[string]types.MetaBundle)
- type ValidatorTesterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultValidBundleMap ¶
func DefaultValidBundleMap() (map[string]types.MetaBundle, error)
Types ¶
type MockOCMClient ¶ added in v0.12.0
MockOCMClient satisfies the types.OCMClient interface and is used to test validators interacting with OCM.
func NewMockOCMClient ¶ added in v0.12.0
func NewMockOCMClient() *MockOCMClient
func (*MockOCMClient) CloseConnection ¶ added in v0.12.0
func (m *MockOCMClient) CloseConnection() error
func (*MockOCMClient) QuotaRuleExists ¶ added in v0.12.0
type MockQuayClient ¶ added in v0.12.0
func NewMockQuayClient ¶ added in v0.12.0
func NewMockQuayClient() *MockQuayClient
func (*MockQuayClient) HasReference ¶ added in v0.12.0
func (c *MockQuayClient) HasReference(ctx context.Context, ref validator.ImageReference) (bool, error)
type ValidatorTester ¶
type ValidatorTester struct { *testing.T Val validator.Validator // contains filtered or unexported fields }
func NewValidatorTester ¶
func NewValidatorTester(t *testing.T, init validator.Initializer, opts ...ValidatorTesterOption) ValidatorTester
func (*ValidatorTester) Option ¶
func (v *ValidatorTester) Option(opt ValidatorTesterOption)
func (*ValidatorTester) TestInvalidBundles ¶
func (v *ValidatorTester) TestInvalidBundles(bundles map[string]types.MetaBundle)
func (*ValidatorTester) TestSingleBundle ¶
func (v *ValidatorTester) TestSingleBundle(mb types.MetaBundle) validator.Result
func (*ValidatorTester) TestValidBundles ¶
func (v *ValidatorTester) TestValidBundles(bundles map[string]types.MetaBundle)
type ValidatorTesterOption ¶
type ValidatorTesterOption func(*ValidatorTester)
func ValidatorTesterLogger ¶
func ValidatorTesterLogger(l logr.Logger) ValidatorTesterOption
func ValidatorTesterOCMClient ¶
func ValidatorTesterOCMClient(ocm validator.OCMClient) ValidatorTesterOption
func ValidatorTesterQuayClient ¶ added in v0.12.0
func ValidatorTesterQuayClient(quay validator.QuayClient) ValidatorTesterOption
Click to show internal directories.
Click to hide internal directories.