fixtures

package
v0.0.63 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 6 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 WithFailedGetInstallationIDByAppID

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

func WithFailedGetProviderByID

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

func WithSuccessfulDeletePullRequest

func WithSuccessfulDeletePullRequest() func(*mockdb.MockStore)

func WithSuccessfulGetArtifactByID

func WithSuccessfulGetArtifactByID(
	artifact db.Artifact,
) 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 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