fixtures

package
v0.0.75 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 7 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 NewMockStore

func NewMockStore(
	funcs ...func(*mockdb.MockStore),
) func(*gomock.Controller) *mockdb.MockStore

func WithFailedGetEntitiesByProjectHierarchy

func WithFailedGetEntitiesByProjectHierarchy(
	err error,
) func(*mockdb.MockStore)

func WithFailedGetInstallationIDByAppID

func WithFailedGetInstallationIDByAppID(
	err error,
) func(*mockdb.MockStore)

func WithFailedGetProviderByID

func WithFailedGetProviderByID(
	err error,
) func(*mockdb.MockStore)

func WithRollbackTransaction

func WithRollbackTransaction() func(*mockdb.MockStore)

func WithSuccessfulDeleteEntity

func WithSuccessfulDeleteEntity(entID, projectID uuid.UUID) func(*mockdb.MockStore)

func WithSuccessfulGetArtifactByID

func WithSuccessfulGetArtifactByID(
	artifact db.Artifact,
) func(*mockdb.MockStore)

func WithSuccessfulGetEntitiesByProjectHierarchy

func WithSuccessfulGetEntitiesByProjectHierarchy(
	entities []db.EntityInstance,
	expectedProjectIDs []uuid.UUID,
) func(*mockdb.MockStore)

func WithSuccessfulGetFeatureInProject

func WithSuccessfulGetFeatureInProject(
	active bool,
) func(*mockdb.MockStore)

func WithSuccessfulGetInstallationIDByAppID

func WithSuccessfulGetInstallationIDByAppID(
	provider db.ProviderGithubAppInstallation,
	installationID int64,
) func(*mockdb.MockStore)

func WithSuccessfulGetProviderByID

func WithSuccessfulGetProviderByID(
	provider db.Provider,
	providerID uuid.UUID,
) func(*mockdb.MockStore)

func WithSuccessfulGetRepositoryByRepoID

func WithSuccessfulGetRepositoryByRepoID(
	repository db.Repository,
) func(*mockdb.MockStore)

func WithSuccessfulUpsertArtifact

func WithSuccessfulUpsertArtifact(
	artifact db.Artifact,
) func(*mockdb.MockStore)

func WithSuccessfulUpsertPullRequest

func WithSuccessfulUpsertPullRequest(
	pullRequest db.PullRequest,
) func(*mockdb.MockStore)

func WithSuccessfulUpsertPullRequestWithParams

func WithSuccessfulUpsertPullRequestWithParams(
	pullRequest db.PullRequest,
	instance db.EntityInstance,
	entParams db.CreateOrEnsureEntityByIDParams,
) func(*mockdb.MockStore)

func WithSuccessfullGetEntityByID

func WithSuccessfullGetEntityByID(
	expID uuid.UUID,
	entity db.EntityInstance,
) func(*mockdb.MockStore)

func WithTransaction

func WithTransaction() func(*mockdb.MockStore)

Types

type MockStoreBuilder

type MockStoreBuilder = func(*gomock.Controller) *mockdb.MockStore

Jump to

Keyboard shortcuts

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