mocks

package
v0.0.0-...-267b159 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Mock implementation of a workflow repo to be used for tests.

Mock implementation of a workflow repo to be used for tests.

Mock implementation of a workflow repo to be used for tests.

Mock implementation of a task repo to be used for tests.

Mock implementation of a workflow repo to be used for tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockExecutionRepo

func NewMockExecutionRepo() interfaces.ExecutionRepoInterface

func NewMockLaunchPlanRepo

func NewMockLaunchPlanRepo() interfaces.LaunchPlanRepoInterface

func NewMockNamedEntityRepo

func NewMockNamedEntityRepo() interfaces.NamedEntityRepoInterface

func NewMockNodeExecutionRepo

func NewMockNodeExecutionRepo() interfaces.NodeExecutionRepoInterface

func NewMockProjectRepo

func NewMockProjectRepo() interfaces.ProjectRepoInterface

func NewMockRepository

func NewMockRepository() interfaces.Repository

func NewMockResourceRepo

func NewMockResourceRepo() interfaces.ResourceRepoInterface

func NewMockTaskExecutionRepo

func NewMockTaskExecutionRepo() interfaces.TaskExecutionRepoInterface

func NewMockTaskRepo

func NewMockTaskRepo() interfaces.TaskRepoInterface

func NewMockWorkflowRepo

func NewMockWorkflowRepo() interfaces.WorkflowRepoInterface

Types

type CountExecutionFunc

type CountExecutionFunc func(ctx context.Context, input interfaces.CountResourceInput) (int64, error)

type CountNodeExecutionFunc

type CountNodeExecutionFunc func(ctx context.Context, input interfaces.CountResourceInput) (int64, error)

type CountTaskExecutionFunc

type CountTaskExecutionFunc func(ctx context.Context, input interfaces.CountResourceInput) (int64, error)

type CreateDescriptionEntityFunc

type CreateDescriptionEntityFunc func(input models.DescriptionEntity) error

type CreateExecutionFunc

type CreateExecutionFunc func(ctx context.Context, input models.Execution) error

type CreateLaunchPlanFunc

type CreateLaunchPlanFunc func(input models.LaunchPlan) error

type CreateNodeExecutionFunc

type CreateNodeExecutionFunc func(ctx context.Context, input *models.NodeExecution) error

type CreateOrUpdateResourceFunction

type CreateOrUpdateResourceFunction func(ctx context.Context, input models.Resource) error

type CreateProjectFunction

type CreateProjectFunction func(ctx context.Context, project models.Project) error

type CreateTaskExecutionFunc

type CreateTaskExecutionFunc func(ctx context.Context, input models.TaskExecution) error

type CreateTaskFunc

type CreateTaskFunc func(input models.Task, descriptionEntity *models.DescriptionEntity) error

type CreateWorkflowFunc

type CreateWorkflowFunc func(input models.Workflow, descriptionEntity *models.DescriptionEntity) error

type DeleteResourceFunction

type DeleteResourceFunction func(ctx context.Context, ID interfaces.ResourceID) error

type ExecutionEventRepoInterface

type ExecutionEventRepoInterface struct {
	mock.Mock
}

ExecutionEventRepoInterface is an autogenerated mock type for the ExecutionEventRepoInterface type

func (*ExecutionEventRepoInterface) Create

Create provides a mock function with given fields: ctx, input

func (*ExecutionEventRepoInterface) OnCreate

func (*ExecutionEventRepoInterface) OnCreateMatch

func (_m *ExecutionEventRepoInterface) OnCreateMatch(matchers ...interface{}) *ExecutionEventRepoInterface_Create

type ExecutionEventRepoInterface_Create

type ExecutionEventRepoInterface_Create struct {
	*mock.Call
}

func (ExecutionEventRepoInterface_Create) Return

type ExistsNodeExecutionFunc

type ExistsNodeExecutionFunc func(ctx context.Context, input interfaces.NodeExecutionResource) (bool, error)

type GetExecutionFunc

type GetExecutionFunc func(ctx context.Context, input interfaces.Identifier) (models.Execution, error)

type GetLaunchPlanFunc

type GetLaunchPlanFunc func(input interfaces.Identifier) (models.LaunchPlan, error)

type GetNamedEntityFunc

type GetNamedEntityFunc func(input interfaces.GetNamedEntityInput) (models.NamedEntity, error)

type GetNodeExecutionFunc

type GetNodeExecutionFunc func(ctx context.Context, input interfaces.NodeExecutionResource) (models.NodeExecution, error)

type GetProjectFunction

type GetProjectFunction func(ctx context.Context, projectID string) (models.Project, error)

type GetResourceFunction

type GetResourceFunction func(ctx context.Context, ID interfaces.ResourceID) (
	models.Resource, error)

type GetTaskExecutionFunc

type GetTaskExecutionFunc func(ctx context.Context, input interfaces.GetTaskExecutionInput) (models.TaskExecution, error)

type GetTaskFunc

type GetTaskFunc func(input interfaces.Identifier) (models.Task, error)

type GetWorkflowFunc

type GetWorkflowFunc func(input interfaces.Identifier) (models.Workflow, error)

type ListAllResourcesFunction

type ListAllResourcesFunction func(ctx context.Context, resourceType string) ([]models.Resource, error)

type ListProjectsFunction

type ListProjectsFunction func(ctx context.Context, input interfaces.ListResourceInput) ([]models.Project, error)

type MockDescriptionEntityRepo

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

func (*MockDescriptionEntityRepo) Create

func (r *MockDescriptionEntityRepo) Create(ctx context.Context, DescriptionEntity models.DescriptionEntity) (uint, error)

func (*MockDescriptionEntityRepo) Get

func (*MockDescriptionEntityRepo) SetCreateCallback

func (r *MockDescriptionEntityRepo) SetCreateCallback(createFunction CreateDescriptionEntityFunc)

func (*MockDescriptionEntityRepo) SetGetCallback

func (r *MockDescriptionEntityRepo) SetGetCallback(getFunction GetDescriptionEntityFunc)

func (*MockDescriptionEntityRepo) SetListCallback

func (r *MockDescriptionEntityRepo) SetListCallback(listFunction ListDescriptionEntityFunc)

type MockExecutionRepo

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

func (*MockExecutionRepo) Count

func (*MockExecutionRepo) Create

func (r *MockExecutionRepo) Create(ctx context.Context, input models.Execution) error

func (*MockExecutionRepo) Get

func (*MockExecutionRepo) SetCountCallback

func (r *MockExecutionRepo) SetCountCallback(countFunction CountExecutionFunc)

func (*MockExecutionRepo) SetCreateCallback

func (r *MockExecutionRepo) SetCreateCallback(createFunction CreateExecutionFunc)

func (*MockExecutionRepo) SetGetCallback

func (r *MockExecutionRepo) SetGetCallback(getFunction GetExecutionFunc)

func (*MockExecutionRepo) SetListCallback

func (r *MockExecutionRepo) SetListCallback(listFunction ListExecutionFunc)

func (*MockExecutionRepo) SetUpdateCallback

func (r *MockExecutionRepo) SetUpdateCallback(updateFunction UpdateExecutionFunc)

func (*MockExecutionRepo) Update

func (r *MockExecutionRepo) Update(ctx context.Context, execution models.Execution) error

type MockLaunchPlanRepo

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

func (*MockLaunchPlanRepo) Create

func (r *MockLaunchPlanRepo) Create(ctx context.Context, input models.LaunchPlan) error

func (*MockLaunchPlanRepo) Get

func (*MockLaunchPlanRepo) ListLaunchPlanIdentifiers

func (*MockLaunchPlanRepo) SetActive

func (r *MockLaunchPlanRepo) SetActive(
	ctx context.Context, toEnable models.LaunchPlan, toDisable *models.LaunchPlan) error

func (*MockLaunchPlanRepo) SetCreateCallback

func (r *MockLaunchPlanRepo) SetCreateCallback(createFunction CreateLaunchPlanFunc)

func (*MockLaunchPlanRepo) SetGetCallback

func (r *MockLaunchPlanRepo) SetGetCallback(getFunction GetLaunchPlanFunc)

func (*MockLaunchPlanRepo) SetListCallback

func (r *MockLaunchPlanRepo) SetListCallback(listFunction ListLaunchPlanFunc)

func (*MockLaunchPlanRepo) SetListLaunchPlanIdentifiersCallback

func (r *MockLaunchPlanRepo) SetListLaunchPlanIdentifiersCallback(fn ListLaunchPlanIdentifiersFunc)

func (*MockLaunchPlanRepo) SetSetActiveCallback

func (r *MockLaunchPlanRepo) SetSetActiveCallback(setActiveFunction SetActiveLaunchPlanFunc)

func (*MockLaunchPlanRepo) SetUpdateCallback

func (r *MockLaunchPlanRepo) SetUpdateCallback(updateFunction UpdateLaunchPlanFunc)

func (*MockLaunchPlanRepo) Update

func (r *MockLaunchPlanRepo) Update(ctx context.Context, launchPlan models.LaunchPlan) error

type MockNamedEntityRepo

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

func (*MockNamedEntityRepo) Get

func (*MockNamedEntityRepo) SetGetCallback

func (r *MockNamedEntityRepo) SetGetCallback(getFunction GetNamedEntityFunc)

func (*MockNamedEntityRepo) SetListCallback

func (r *MockNamedEntityRepo) SetListCallback(listFunction ListNamedEntityFunc)

func (*MockNamedEntityRepo) SetUpdateCallback

func (r *MockNamedEntityRepo) SetUpdateCallback(updateFunction UpdateNamedEntityFunc)

func (*MockNamedEntityRepo) Update

func (r *MockNamedEntityRepo) Update(ctx context.Context, NamedEntity models.NamedEntity) error

type MockNodeExecutionRepo

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

func (*MockNodeExecutionRepo) Count

func (*MockNodeExecutionRepo) Create

func (*MockNodeExecutionRepo) Exists

func (*MockNodeExecutionRepo) Get

func (*MockNodeExecutionRepo) GetWithChildren

func (*MockNodeExecutionRepo) SetCountCallback

func (r *MockNodeExecutionRepo) SetCountCallback(countFunction CountNodeExecutionFunc)

func (*MockNodeExecutionRepo) SetCreateCallback

func (r *MockNodeExecutionRepo) SetCreateCallback(createFunction CreateNodeExecutionFunc)

func (*MockNodeExecutionRepo) SetExistsCallback

func (r *MockNodeExecutionRepo) SetExistsCallback(existsFunction ExistsNodeExecutionFunc)

func (*MockNodeExecutionRepo) SetGetCallback

func (r *MockNodeExecutionRepo) SetGetCallback(getFunction GetNodeExecutionFunc)

func (*MockNodeExecutionRepo) SetGetWithChildrenCallback

func (r *MockNodeExecutionRepo) SetGetWithChildrenCallback(getWithChildrenFunction GetNodeExecutionFunc)

func (*MockNodeExecutionRepo) SetListCallback

func (r *MockNodeExecutionRepo) SetListCallback(listFunction ListNodeExecutionFunc)

func (*MockNodeExecutionRepo) SetUpdateCallback

func (r *MockNodeExecutionRepo) SetUpdateCallback(updateFunction UpdateNodeExecutionFunc)

func (*MockNodeExecutionRepo) Update

func (r *MockNodeExecutionRepo) Update(ctx context.Context, nodeExecution *models.NodeExecution) error

type MockProjectRepo

type MockProjectRepo struct {
	CreateFunction        CreateProjectFunction
	GetFunction           GetProjectFunction
	ListProjectsFunction  ListProjectsFunction
	UpdateProjectFunction UpdateProjectFunction
}

func (*MockProjectRepo) Create

func (r *MockProjectRepo) Create(ctx context.Context, project models.Project) error

func (*MockProjectRepo) Get

func (r *MockProjectRepo) Get(ctx context.Context, projectID string) (models.Project, error)

func (*MockProjectRepo) List

func (*MockProjectRepo) UpdateProject

func (r *MockProjectRepo) UpdateProject(ctx context.Context, projectUpdate models.Project) error

type MockRepository

type MockRepository struct {
	ExecutionEventRepoIface interfaces.ExecutionEventRepoInterface

	NodeExecutionEventRepoIface interfaces.NodeExecutionEventRepoInterface
	ProjectRepoIface            interfaces.ProjectRepoInterface
	// contains filtered or unexported fields
}

func (*MockRepository) DescriptionEntityRepo

func (r *MockRepository) DescriptionEntityRepo() interfaces.DescriptionEntityRepoInterface

func (*MockRepository) ExecutionEventRepo

func (r *MockRepository) ExecutionEventRepo() interfaces.ExecutionEventRepoInterface

func (*MockRepository) ExecutionRepo

func (*MockRepository) GetGormDB

func (r *MockRepository) GetGormDB() *gorm.DB

func (*MockRepository) LaunchPlanRepo

func (*MockRepository) NamedEntityRepo

func (r *MockRepository) NamedEntityRepo() interfaces.NamedEntityRepoInterface

func (*MockRepository) NodeExecutionEventRepo

func (r *MockRepository) NodeExecutionEventRepo() interfaces.NodeExecutionEventRepoInterface

func (*MockRepository) NodeExecutionRepo

func (r *MockRepository) NodeExecutionRepo() interfaces.NodeExecutionRepoInterface

func (*MockRepository) ProjectRepo

func (*MockRepository) ResourceRepo

func (*MockRepository) SchedulableEntityRepo

func (r *MockRepository) SchedulableEntityRepo() sIface.SchedulableEntityRepoInterface

func (*MockRepository) ScheduleEntitiesSnapshotRepo

func (r *MockRepository) ScheduleEntitiesSnapshotRepo() sIface.ScheduleEntitiesSnapShotRepoInterface

func (*MockRepository) SignalRepo

func (*MockRepository) TaskExecutionRepo

func (r *MockRepository) TaskExecutionRepo() interfaces.TaskExecutionRepoInterface

func (*MockRepository) TaskRepo

func (*MockRepository) WorkflowRepo

type MockResourceRepo

type MockResourceRepo struct {
	CreateOrUpdateFunction CreateOrUpdateResourceFunction
	GetFunction            GetResourceFunction
	DeleteFunction         DeleteResourceFunction
	ListAllFunction        ListAllResourcesFunction
}

func (*MockResourceRepo) CreateOrUpdate

func (r *MockResourceRepo) CreateOrUpdate(ctx context.Context, input models.Resource) error

func (*MockResourceRepo) Delete

func (*MockResourceRepo) Get

func (*MockResourceRepo) GetProjectLevel

func (r *MockResourceRepo) GetProjectLevel(ctx context.Context, ID interfaces.ResourceID) (
	models.Resource, error)

func (*MockResourceRepo) GetRaw

func (*MockResourceRepo) ListAll

func (r *MockResourceRepo) ListAll(ctx context.Context, resourceType string) ([]models.Resource, error)

type MockTaskExecutionRepo

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

func (*MockTaskExecutionRepo) Count

func (*MockTaskExecutionRepo) Create

func (*MockTaskExecutionRepo) Get

func (*MockTaskExecutionRepo) SetCountCallback

func (r *MockTaskExecutionRepo) SetCountCallback(countFunction CountTaskExecutionFunc)

func (*MockTaskExecutionRepo) SetCreateCallback

func (r *MockTaskExecutionRepo) SetCreateCallback(createFunction CreateTaskExecutionFunc)

func (*MockTaskExecutionRepo) SetGetCallback

func (r *MockTaskExecutionRepo) SetGetCallback(getFunction GetTaskExecutionFunc)

func (*MockTaskExecutionRepo) SetListCallback

func (r *MockTaskExecutionRepo) SetListCallback(listFunction ListTaskExecutionFunc)

func (*MockTaskExecutionRepo) SetUpdateCallback

func (r *MockTaskExecutionRepo) SetUpdateCallback(updateFunction UpdateTaskExecutionFunc)

func (*MockTaskExecutionRepo) Update

func (r *MockTaskExecutionRepo) Update(ctx context.Context, execution models.TaskExecution) error

type MockTaskRepo

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

func (*MockTaskRepo) Create

func (r *MockTaskRepo) Create(ctx context.Context, input models.Task, descriptionEntity *models.DescriptionEntity) error

func (*MockTaskRepo) Get

func (*MockTaskRepo) List

func (*MockTaskRepo) ListTaskIdentifiers

func (*MockTaskRepo) SetCreateCallback

func (r *MockTaskRepo) SetCreateCallback(createFunction CreateTaskFunc)

func (*MockTaskRepo) SetGetCallback

func (r *MockTaskRepo) SetGetCallback(getFunction GetTaskFunc)

func (*MockTaskRepo) SetListCallback

func (r *MockTaskRepo) SetListCallback(listFunction ListTaskFunc)

func (*MockTaskRepo) SetListTaskIdentifiersCallback

func (r *MockTaskRepo) SetListTaskIdentifiersCallback(listFunction ListTaskIdentifiersFunc)

type MockWorkflowRepo

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

func (*MockWorkflowRepo) Create

func (r *MockWorkflowRepo) Create(ctx context.Context, input models.Workflow, descriptionEntity *models.DescriptionEntity) error

func (*MockWorkflowRepo) Get

func (*MockWorkflowRepo) ListIdentifiers

func (*MockWorkflowRepo) SetCreateCallback

func (r *MockWorkflowRepo) SetCreateCallback(createFunction CreateWorkflowFunc)

func (*MockWorkflowRepo) SetGetCallback

func (r *MockWorkflowRepo) SetGetCallback(getFunction GetWorkflowFunc)

func (*MockWorkflowRepo) SetListCallback

func (r *MockWorkflowRepo) SetListCallback(listFunction ListWorkflowFunc)

func (*MockWorkflowRepo) SetListIdentifiersFunc

func (r *MockWorkflowRepo) SetListIdentifiersFunc(fn ListIdentifiersFunc)

type NodeExecutionEventRepoInterface

type NodeExecutionEventRepoInterface struct {
	mock.Mock
}

NodeExecutionEventRepoInterface is an autogenerated mock type for the NodeExecutionEventRepoInterface type

func (*NodeExecutionEventRepoInterface) Create

Create provides a mock function with given fields: ctx, input

func (*NodeExecutionEventRepoInterface) OnCreate

func (*NodeExecutionEventRepoInterface) OnCreateMatch

func (_m *NodeExecutionEventRepoInterface) OnCreateMatch(matchers ...interface{}) *NodeExecutionEventRepoInterface_Create

type NodeExecutionEventRepoInterface_Create

type NodeExecutionEventRepoInterface_Create struct {
	*mock.Call
}

func (NodeExecutionEventRepoInterface_Create) Return

type SetActiveLaunchPlanFunc

type SetActiveLaunchPlanFunc func(toEnable models.LaunchPlan, toDisable *models.LaunchPlan) error

type SignalRepoInterface

type SignalRepoInterface struct {
	mock.Mock
}

SignalRepoInterface is an autogenerated mock type for the SignalRepoInterface type

func (*SignalRepoInterface) Get

Get provides a mock function with given fields: ctx, input

func (*SignalRepoInterface) GetOrCreate

func (_m *SignalRepoInterface) GetOrCreate(ctx context.Context, input *models.Signal) error

GetOrCreate provides a mock function with given fields: ctx, input

func (*SignalRepoInterface) List

List provides a mock function with given fields: ctx, input

func (*SignalRepoInterface) OnGet

func (*SignalRepoInterface) OnGetMatch

func (_m *SignalRepoInterface) OnGetMatch(matchers ...interface{}) *SignalRepoInterface_Get

func (*SignalRepoInterface) OnGetOrCreate

func (*SignalRepoInterface) OnGetOrCreateMatch

func (_m *SignalRepoInterface) OnGetOrCreateMatch(matchers ...interface{}) *SignalRepoInterface_GetOrCreate

func (*SignalRepoInterface) OnList

func (*SignalRepoInterface) OnListMatch

func (_m *SignalRepoInterface) OnListMatch(matchers ...interface{}) *SignalRepoInterface_List

func (*SignalRepoInterface) OnUpdate

func (*SignalRepoInterface) OnUpdateMatch

func (_m *SignalRepoInterface) OnUpdateMatch(matchers ...interface{}) *SignalRepoInterface_Update

func (*SignalRepoInterface) Update

func (_m *SignalRepoInterface) Update(ctx context.Context, input models.SignalKey, value []byte) error

Update provides a mock function with given fields: ctx, input, value

type SignalRepoInterface_Get

type SignalRepoInterface_Get struct {
	*mock.Call
}

func (SignalRepoInterface_Get) Return

type SignalRepoInterface_GetOrCreate

type SignalRepoInterface_GetOrCreate struct {
	*mock.Call
}

func (SignalRepoInterface_GetOrCreate) Return

type SignalRepoInterface_List

type SignalRepoInterface_List struct {
	*mock.Call
}

func (SignalRepoInterface_List) Return

type SignalRepoInterface_Update

type SignalRepoInterface_Update struct {
	*mock.Call
}

func (SignalRepoInterface_Update) Return

type UpdateExecutionFunc

type UpdateExecutionFunc func(ctx context.Context, execution models.Execution) error

type UpdateLaunchPlanFunc

type UpdateLaunchPlanFunc func(input models.LaunchPlan) error

type UpdateNamedEntityFunc

type UpdateNamedEntityFunc func(input models.NamedEntity) error

type UpdateNodeExecutionFunc

type UpdateNodeExecutionFunc func(ctx context.Context, nodeExecution *models.NodeExecution) error

type UpdateProjectFunction

type UpdateProjectFunction func(ctx context.Context, projectUpdate models.Project) error

type UpdateTaskExecutionFunc

type UpdateTaskExecutionFunc func(ctx context.Context, execution models.TaskExecution) error

Jump to

Keyboard shortcuts

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