tests

package
v1.16.11 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 15 Imported by: 5

Documentation

Overview

Package tests is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeleteDependenciesError

func NewDeleteDependenciesError(testName string, allErrors []error) error

Types

type DeleteDependenciesError

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

func (*DeleteDependenciesError) Error

func (e *DeleteDependenciesError) Error() string

type Interface

type Interface interface {
	List(selector string) (*testsv3.TestList, error)
	ListLabels() (map[string][]string, error)
	Get(name string) (*testsv3.Test, error)
	Create(test *testsv3.Test, options ...Option) (*testsv3.Test, error)
	Update(test *testsv3.Test, options ...Option) (*testsv3.Test, error)
	Delete(name string) error
	DeleteAll() error
	CreateTestSecrets(test *testsv3.Test) error
	UpdateTestSecrets(test *testsv3.Test) error
	LoadTestVariablesSecret(test *testsv3.Test) (*corev1.Secret, error)
	GetCurrentSecretUUID(testName string) (string, error)
	GetSecretTestVars(testName, secretUUID string) (map[string]string, error)
	ListByNames(names []string) ([]testsv3.Test, error)
	DeleteByLabels(selector string) error
	UpdateStatus(test *testsv3.Test) error
}

type MockInterface

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

MockInterface is a mock of Interface interface.

func NewMockInterface

func NewMockInterface(ctrl *gomock.Controller) *MockInterface

NewMockInterface creates a new mock instance.

func (*MockInterface) Create

func (m *MockInterface) Create(test *v3.Test, options ...Option) (*v3.Test, error)

Create mocks base method.

func (*MockInterface) CreateTestSecrets

func (m *MockInterface) CreateTestSecrets(test *v3.Test) error

CreateTestSecrets mocks base method.

func (*MockInterface) Delete

func (m *MockInterface) Delete(name string) error

Delete mocks base method.

func (*MockInterface) DeleteAll

func (m *MockInterface) DeleteAll() error

DeleteAll mocks base method.

func (*MockInterface) DeleteByLabels

func (m *MockInterface) DeleteByLabels(selector string) error

DeleteByLabels mocks base method.

func (*MockInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInterface) Get

func (m *MockInterface) Get(name string) (*v3.Test, error)

Get mocks base method.

func (*MockInterface) GetCurrentSecretUUID

func (m *MockInterface) GetCurrentSecretUUID(testName string) (string, error)

GetCurrentSecretUUID mocks base method.

func (*MockInterface) GetSecretTestVars

func (m *MockInterface) GetSecretTestVars(testName, secretUUID string) (map[string]string, error)

GetSecretTestVars mocks base method.

func (*MockInterface) List

func (m *MockInterface) List(selector string) (*v3.TestList, error)

List mocks base method.

func (*MockInterface) ListByNames

func (m *MockInterface) ListByNames(names []string) ([]v3.Test, error)

ListByNames mocks base method.

func (*MockInterface) ListLabels

func (m *MockInterface) ListLabels() (map[string][]string, error)

ListLabels mocks base method.

func (*MockInterface) LoadTestVariablesSecret

func (m *MockInterface) LoadTestVariablesSecret(test *v3.Test) (*v1.Secret, error)

LoadTestVariablesSecret mocks base method.

func (*MockInterface) Update

func (m *MockInterface) Update(test *v3.Test, options ...Option) (*v3.Test, error)

Update mocks base method.

func (*MockInterface) UpdateStatus

func (m *MockInterface) UpdateStatus(test *v3.Test) error

UpdateStatus mocks base method.

func (*MockInterface) UpdateTestSecrets

func (m *MockInterface) UpdateTestSecrets(test *v3.Test) error

UpdateTestSecrets mocks base method.

type MockInterfaceMockRecorder

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

MockInterfaceMockRecorder is the mock recorder for MockInterface.

func (*MockInterfaceMockRecorder) Create

func (mr *MockInterfaceMockRecorder) Create(test interface{}, options ...interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockInterfaceMockRecorder) CreateTestSecrets

func (mr *MockInterfaceMockRecorder) CreateTestSecrets(test interface{}) *gomock.Call

CreateTestSecrets indicates an expected call of CreateTestSecrets.

func (*MockInterfaceMockRecorder) Delete

func (mr *MockInterfaceMockRecorder) Delete(name interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockInterfaceMockRecorder) DeleteAll

func (mr *MockInterfaceMockRecorder) DeleteAll() *gomock.Call

DeleteAll indicates an expected call of DeleteAll.

func (*MockInterfaceMockRecorder) DeleteByLabels

func (mr *MockInterfaceMockRecorder) DeleteByLabels(selector interface{}) *gomock.Call

DeleteByLabels indicates an expected call of DeleteByLabels.

func (*MockInterfaceMockRecorder) Get

func (mr *MockInterfaceMockRecorder) Get(name interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockInterfaceMockRecorder) GetCurrentSecretUUID

func (mr *MockInterfaceMockRecorder) GetCurrentSecretUUID(testName interface{}) *gomock.Call

GetCurrentSecretUUID indicates an expected call of GetCurrentSecretUUID.

func (*MockInterfaceMockRecorder) GetSecretTestVars

func (mr *MockInterfaceMockRecorder) GetSecretTestVars(testName, secretUUID interface{}) *gomock.Call

GetSecretTestVars indicates an expected call of GetSecretTestVars.

func (*MockInterfaceMockRecorder) List

func (mr *MockInterfaceMockRecorder) List(selector interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockInterfaceMockRecorder) ListByNames

func (mr *MockInterfaceMockRecorder) ListByNames(names interface{}) *gomock.Call

ListByNames indicates an expected call of ListByNames.

func (*MockInterfaceMockRecorder) ListLabels

func (mr *MockInterfaceMockRecorder) ListLabels() *gomock.Call

ListLabels indicates an expected call of ListLabels.

func (*MockInterfaceMockRecorder) LoadTestVariablesSecret

func (mr *MockInterfaceMockRecorder) LoadTestVariablesSecret(test interface{}) *gomock.Call

LoadTestVariablesSecret indicates an expected call of LoadTestVariablesSecret.

func (*MockInterfaceMockRecorder) Update

func (mr *MockInterfaceMockRecorder) Update(test interface{}, options ...interface{}) *gomock.Call

Update indicates an expected call of Update.

func (*MockInterfaceMockRecorder) UpdateStatus

func (mr *MockInterfaceMockRecorder) UpdateStatus(test interface{}) *gomock.Call

UpdateStatus indicates an expected call of UpdateStatus.

func (*MockInterfaceMockRecorder) UpdateTestSecrets

func (mr *MockInterfaceMockRecorder) UpdateTestSecrets(test interface{}) *gomock.Call

UpdateTestSecrets indicates an expected call of UpdateTestSecrets.

type Option

type Option struct {
	Secrets map[string]string
}

Option contain test source options

type TestsClient

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

TestsClient implements methods to work with Test

func NewClient

func NewClient(client client.Client, namespace string) *TestsClient

NewClient creates new Test client

func (TestsClient) Create

func (s TestsClient) Create(test *testsv3.Test, options ...Option) (*testsv3.Test, error)

Create creates new Test and coupled resources

func (TestsClient) CreateTestSecrets

func (s TestsClient) CreateTestSecrets(test *testsv3.Test) error

CreateTestSecrets creates corresponding test vars secrets

func (TestsClient) Delete

func (s TestsClient) Delete(name string) error

Delete deletes existing Test and coupled resources (secrets)

func (TestsClient) DeleteAll

func (s TestsClient) DeleteAll() error

DeleteAll deletes all Tests

func (TestsClient) DeleteByLabels

func (s TestsClient) DeleteByLabels(selector string) error

DeleteByLabels deletes tests by labels

func (TestsClient) Get

func (s TestsClient) Get(name string) (*testsv3.Test, error)

Get returns Test, loads and decodes secrets data

func (TestsClient) GetCurrentSecretUUID

func (s TestsClient) GetCurrentSecretUUID(testName string) (string, error)

GetCurrentSecretUUID returns current secret uuid

func (TestsClient) GetSecretTestVars

func (s TestsClient) GetSecretTestVars(testName, secretUUID string) (map[string]string, error)

GetSecretTestVars returns secret test vars

func (TestsClient) List

func (s TestsClient) List(selector string) (*testsv3.TestList, error)

List lists Tests

func (TestsClient) ListByNames

func (s TestsClient) ListByNames(names []string) ([]testsv3.Test, error)

ListByNames returns Tests by names TODO - should be replaced by --field-selector when it supports IN for expression

func (TestsClient) ListLabels

func (s TestsClient) ListLabels() (map[string][]string, error)

ListLabels labels for Tests

func (TestsClient) LoadTestVariablesSecret

func (s TestsClient) LoadTestVariablesSecret(test *testsv3.Test) (*corev1.Secret, error)

func (TestsClient) TestHasSecrets

func (s TestsClient) TestHasSecrets(test *testsv3.Test) (has bool)

func (TestsClient) Update

func (s TestsClient) Update(test *testsv3.Test, options ...Option) (*testsv3.Test, error)

Update updates existing Test and coupled resources

func (TestsClient) UpdateStatus

func (s TestsClient) UpdateStatus(test *testsv3.Test) error

UpdateStatus updates existing Test status

func (TestsClient) UpdateTestSecrets

func (s TestsClient) UpdateTestSecrets(test *testsv3.Test) error

Jump to

Keyboard shortcuts

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