fixtures

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package fixtures contains fixtures used within the github repositories package. It is for testing purposes only.

Index

Constants

View Source
const (
	RepoOwner = "acme"
	RepoName  = "api-gateway"
	HookID    = int64(12345)
)

Variables

View Source
var (
	// ErrClientTest is a sample error used by the fixtures
	ErrClientTest = errors.New("oh no")
	ResultHook    = &github.Hook{
		ID: ptr.Ptr[int64](HookID),
		Config: &github.HookConfig{
			URL: ptr.Ptr("https://foo"),
		},
	}
)

Functions

func WithFailedCreation

func WithFailedCreation(mock ClientMock)

func WithFailedDeletion

func WithFailedDeletion(mock ClientMock)

func WithFailedGet

func WithFailedGet(mock ClientMock)

func WithFailedList

func WithFailedList(mock ClientMock)

func WithNotFoundDeletion

func WithNotFoundDeletion(mock ClientMock)

func WithNotFoundList

func WithNotFoundList(mock ClientMock)

func WithSuccessfulCreation

func WithSuccessfulCreation(mock ClientMock)

func WithSuccessfulDeletion

func WithSuccessfulDeletion(mock *mockghclient.MockGitHubRepoClient)

func WithSuccessfulGet

func WithSuccessfulGet(repo *github.Repository) func(ClientMock)

func WithSuccessfulList

func WithSuccessfulList(url string) func(ClientMock)

Types

type ClientMockBuilder

type ClientMockBuilder = func(*gomock.Controller) ClientMock

func NewClientMock

func NewClientMock(opts ...func(ClientMock)) ClientMockBuilder

Jump to

Keyboard shortcuts

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