fixtures

package
v0.0.65 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 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 added in v0.0.65

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 added in v0.0.65

func WithRollbackTransaction() func(*mockdb.MockStore)

func WithSuccessfulDeleteEntity added in v0.0.65

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

func WithSuccessfulDeletePullRequest

func WithSuccessfulDeletePullRequest() func(*mockdb.MockStore)

func WithSuccessfulGetArtifactByID

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

func WithSuccessfulGetEntitiesByProjectHierarchy added in v0.0.65

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 added in v0.0.65

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

func WithSuccessfullGetEntityByID added in v0.0.65

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

func WithTransaction added in v0.0.59

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