fixtures

package
v0.0.79 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package fixtures contains code for creating RepositoryService fixtures and is used in various parts of the code. For testing use only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithFailedCreate

func WithFailedCreate(
	err error,
	projectID uuid.UUID,
) func(RepoServiceMock)

func WithFailedDeleteByID

func WithFailedDeleteByID(err error) func(RepoServiceMock)

func WithFailedDeleteByName

func WithFailedDeleteByName(err error) func(RepoServiceMock)

func WithFailedListRepositories

func WithFailedListRepositories(err error) func(RepoServiceMock)

func WithSuccessfulCreate

func WithSuccessfulCreate(
	projectID uuid.UUID,
	pbRepo *pb.Repository,
) func(RepoServiceMock)

func WithSuccessfulDeleteByID

func WithSuccessfulDeleteByID() func(RepoServiceMock)

func WithSuccessfulDeleteByIDDetailed

func WithSuccessfulDeleteByIDDetailed(
	repositoryID uuid.UUID,
	projectID uuid.UUID,
) func(RepoServiceMock)

func WithSuccessfulDeleteByName

func WithSuccessfulDeleteByName() func(RepoServiceMock)

func WithSuccessfulListRepositories

func WithSuccessfulListRepositories(
	repositories ...*models.EntityWithProperties,
) func(RepoServiceMock)

Types

type RepoMockBuilder

type RepoMockBuilder = func(*gomock.Controller) RepoServiceMock

func NewRepoService

func NewRepoService(opts ...func(RepoServiceMock)) RepoMockBuilder

type RepoServiceMock

type RepoServiceMock = *mockghrepo.MockRepositoryService

Jump to

Keyboard shortcuts

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