mocks

package
v0.1.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubClient

type GithubClient struct {
	mock.Mock
}

GithubClient is an autogenerated mock type for the GithubClient type

func NewGithubClient

func NewGithubClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *GithubClient

NewGithubClient creates a new instance of GithubClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*GithubClient) CreateEntityHook added in v0.1.5

func (_m *GithubClient) CreateEntityHook(ctx context.Context, hook *github.Hook) (*github.Hook, error)

CreateEntityHook provides a mock function with given fields: ctx, hook

func (*GithubClient) CreateEntityRegistrationToken added in v0.1.5

func (_m *GithubClient) CreateEntityRegistrationToken(ctx context.Context) (*github.RegistrationToken, *github.Response, error)

CreateEntityRegistrationToken provides a mock function with given fields: ctx

func (*GithubClient) DeleteEntityHook added in v0.1.5

func (_m *GithubClient) DeleteEntityHook(ctx context.Context, id int64) (*github.Response, error)

DeleteEntityHook provides a mock function with given fields: ctx, id

func (*GithubClient) GetEntityHook added in v0.1.5

func (_m *GithubClient) GetEntityHook(ctx context.Context, id int64) (*github.Hook, error)

GetEntityHook provides a mock function with given fields: ctx, id

func (*GithubClient) GetEntityJITConfig added in v0.1.5

func (_m *GithubClient) GetEntityJITConfig(ctx context.Context, instance string, pool params.Pool, labels []string) (map[string]string, *github.Runner, error)

GetEntityJITConfig provides a mock function with given fields: ctx, instance, pool, labels

func (*GithubClient) GetWorkflowJobByID

func (_m *GithubClient) GetWorkflowJobByID(ctx context.Context, owner string, repo string, jobID int64) (*github.WorkflowJob, *github.Response, error)

GetWorkflowJobByID provides a mock function with given fields: ctx, owner, repo, jobID

func (*GithubClient) ListEntityHooks added in v0.1.5

func (_m *GithubClient) ListEntityHooks(ctx context.Context, opts *github.ListOptions) ([]*github.Hook, *github.Response, error)

ListEntityHooks provides a mock function with given fields: ctx, opts

func (*GithubClient) ListEntityRunnerApplicationDownloads added in v0.1.5

func (_m *GithubClient) ListEntityRunnerApplicationDownloads(ctx context.Context) ([]*github.RunnerApplicationDownload, *github.Response, error)

ListEntityRunnerApplicationDownloads provides a mock function with given fields: ctx

func (*GithubClient) ListEntityRunners added in v0.1.5

func (_m *GithubClient) ListEntityRunners(ctx context.Context, opts *github.ListOptions) (*github.Runners, *github.Response, error)

ListEntityRunners provides a mock function with given fields: ctx, opts

func (*GithubClient) PingEntityHook added in v0.1.5

func (_m *GithubClient) PingEntityHook(ctx context.Context, id int64) (*github.Response, error)

PingEntityHook provides a mock function with given fields: ctx, id

func (*GithubClient) RemoveEntityRunner added in v0.1.5

func (_m *GithubClient) RemoveEntityRunner(ctx context.Context, runnerID int64) (*github.Response, error)

RemoveEntityRunner provides a mock function with given fields: ctx, runnerID

type GithubEnterpriseClient

type GithubEnterpriseClient struct {
	mock.Mock
}

GithubEnterpriseClient is an autogenerated mock type for the GithubEnterpriseClient type

func NewGithubEnterpriseClient

func NewGithubEnterpriseClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *GithubEnterpriseClient

NewGithubEnterpriseClient creates a new instance of GithubEnterpriseClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*GithubEnterpriseClient) CreateRegistrationToken

func (_m *GithubEnterpriseClient) CreateRegistrationToken(ctx context.Context, enterprise string) (*github.RegistrationToken, *github.Response, error)

CreateRegistrationToken provides a mock function with given fields: ctx, enterprise

func (*GithubEnterpriseClient) GenerateEnterpriseJITConfig added in v0.1.4

func (_m *GithubEnterpriseClient) GenerateEnterpriseJITConfig(ctx context.Context, enterprise string, request *github.GenerateJITConfigRequest) (*github.JITRunnerConfig, *github.Response, error)

GenerateEnterpriseJITConfig provides a mock function with given fields: ctx, enterprise, request

func (*GithubEnterpriseClient) ListRunnerApplicationDownloads

func (_m *GithubEnterpriseClient) ListRunnerApplicationDownloads(ctx context.Context, enterprise string) ([]*github.RunnerApplicationDownload, *github.Response, error)

ListRunnerApplicationDownloads provides a mock function with given fields: ctx, enterprise

func (*GithubEnterpriseClient) ListRunnerGroups added in v0.1.4

ListRunnerGroups provides a mock function with given fields: ctx, enterprise, opts

func (*GithubEnterpriseClient) ListRunners

func (_m *GithubEnterpriseClient) ListRunners(ctx context.Context, enterprise string, opts *github.ListOptions) (*github.Runners, *github.Response, error)

ListRunners provides a mock function with given fields: ctx, enterprise, opts

func (*GithubEnterpriseClient) RemoveRunner

func (_m *GithubEnterpriseClient) RemoveRunner(ctx context.Context, enterprise string, runnerID int64) (*github.Response, error)

RemoveRunner provides a mock function with given fields: ctx, enterprise, runnerID

type GithubEntityOperations added in v0.1.5

type GithubEntityOperations struct {
	mock.Mock
}

GithubEntityOperations is an autogenerated mock type for the GithubEntityOperations type

func NewGithubEntityOperations added in v0.1.5

func NewGithubEntityOperations(t interface {
	mock.TestingT
	Cleanup(func())
}) *GithubEntityOperations

NewGithubEntityOperations creates a new instance of GithubEntityOperations. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*GithubEntityOperations) CreateEntityHook added in v0.1.5

func (_m *GithubEntityOperations) CreateEntityHook(ctx context.Context, hook *github.Hook) (*github.Hook, error)

CreateEntityHook provides a mock function with given fields: ctx, hook

func (*GithubEntityOperations) CreateEntityRegistrationToken added in v0.1.5

func (_m *GithubEntityOperations) CreateEntityRegistrationToken(ctx context.Context) (*github.RegistrationToken, *github.Response, error)

CreateEntityRegistrationToken provides a mock function with given fields: ctx

func (*GithubEntityOperations) DeleteEntityHook added in v0.1.5

func (_m *GithubEntityOperations) DeleteEntityHook(ctx context.Context, id int64) (*github.Response, error)

DeleteEntityHook provides a mock function with given fields: ctx, id

func (*GithubEntityOperations) GetEntityHook added in v0.1.5

func (_m *GithubEntityOperations) GetEntityHook(ctx context.Context, id int64) (*github.Hook, error)

GetEntityHook provides a mock function with given fields: ctx, id

func (*GithubEntityOperations) GetEntityJITConfig added in v0.1.5

func (_m *GithubEntityOperations) GetEntityJITConfig(ctx context.Context, instance string, pool params.Pool, labels []string) (map[string]string, *github.Runner, error)

GetEntityJITConfig provides a mock function with given fields: ctx, instance, pool, labels

func (*GithubEntityOperations) ListEntityHooks added in v0.1.5

func (_m *GithubEntityOperations) ListEntityHooks(ctx context.Context, opts *github.ListOptions) ([]*github.Hook, *github.Response, error)

ListEntityHooks provides a mock function with given fields: ctx, opts

func (*GithubEntityOperations) ListEntityRunnerApplicationDownloads added in v0.1.5

func (_m *GithubEntityOperations) ListEntityRunnerApplicationDownloads(ctx context.Context) ([]*github.RunnerApplicationDownload, *github.Response, error)

ListEntityRunnerApplicationDownloads provides a mock function with given fields: ctx

func (*GithubEntityOperations) ListEntityRunners added in v0.1.5

func (_m *GithubEntityOperations) ListEntityRunners(ctx context.Context, opts *github.ListOptions) (*github.Runners, *github.Response, error)

ListEntityRunners provides a mock function with given fields: ctx, opts

func (*GithubEntityOperations) PingEntityHook added in v0.1.5

func (_m *GithubEntityOperations) PingEntityHook(ctx context.Context, id int64) (*github.Response, error)

PingEntityHook provides a mock function with given fields: ctx, id

func (*GithubEntityOperations) RemoveEntityRunner added in v0.1.5

func (_m *GithubEntityOperations) RemoveEntityRunner(ctx context.Context, runnerID int64) (*github.Response, error)

RemoveEntityRunner provides a mock function with given fields: ctx, runnerID

type OrganizationHooks added in v0.1.4

type OrganizationHooks struct {
	mock.Mock
}

OrganizationHooks is an autogenerated mock type for the OrganizationHooks type

func NewOrganizationHooks added in v0.1.4

func NewOrganizationHooks(t interface {
	mock.TestingT
	Cleanup(func())
}) *OrganizationHooks

NewOrganizationHooks creates a new instance of OrganizationHooks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*OrganizationHooks) CreateOrgHook added in v0.1.4

func (_m *OrganizationHooks) CreateOrgHook(ctx context.Context, org string, hook *github.Hook) (*github.Hook, *github.Response, error)

CreateOrgHook provides a mock function with given fields: ctx, org, hook

func (*OrganizationHooks) DeleteOrgHook added in v0.1.4

func (_m *OrganizationHooks) DeleteOrgHook(ctx context.Context, org string, id int64) (*github.Response, error)

DeleteOrgHook provides a mock function with given fields: ctx, org, id

func (*OrganizationHooks) GetOrgHook added in v0.1.4

func (_m *OrganizationHooks) GetOrgHook(ctx context.Context, org string, id int64) (*github.Hook, *github.Response, error)

GetOrgHook provides a mock function with given fields: ctx, org, id

func (*OrganizationHooks) ListOrgHooks added in v0.1.4

func (_m *OrganizationHooks) ListOrgHooks(ctx context.Context, org string, opts *github.ListOptions) ([]*github.Hook, *github.Response, error)

ListOrgHooks provides a mock function with given fields: ctx, org, opts

func (*OrganizationHooks) PingOrgHook added in v0.1.4

func (_m *OrganizationHooks) PingOrgHook(ctx context.Context, org string, id int64) (*github.Response, error)

PingOrgHook provides a mock function with given fields: ctx, org, id

type PoolManager

type PoolManager struct {
	mock.Mock
}

PoolManager is an autogenerated mock type for the PoolManager type

func NewPoolManager

func NewPoolManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *PoolManager

NewPoolManager creates a new instance of PoolManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*PoolManager) DeleteRunner added in v0.1.4

func (_m *PoolManager) DeleteRunner(runner params.Instance, forceRemove bool, bypassGHUnauthorizedError bool) error

DeleteRunner provides a mock function with given fields: runner, forceRemove, bypassGHUnauthorizedError

func (*PoolManager) GetWebhookInfo added in v0.1.4

func (_m *PoolManager) GetWebhookInfo(ctx context.Context) (params.HookInfo, error)

GetWebhookInfo provides a mock function with given fields: ctx

func (*PoolManager) GithubRunnerRegistrationToken

func (_m *PoolManager) GithubRunnerRegistrationToken() (string, error)

GithubRunnerRegistrationToken provides a mock function with given fields:

func (*PoolManager) HandleWorkflowJob

func (_m *PoolManager) HandleWorkflowJob(job params.WorkflowJob) error

HandleWorkflowJob provides a mock function with given fields: job

func (*PoolManager) ID

func (_m *PoolManager) ID() string

ID provides a mock function with given fields:

func (*PoolManager) InstallWebhook added in v0.1.4

func (_m *PoolManager) InstallWebhook(ctx context.Context, param params.InstallWebhookParams) (params.HookInfo, error)

InstallWebhook provides a mock function with given fields: ctx, param

func (*PoolManager) RootCABundle added in v0.1.4

func (_m *PoolManager) RootCABundle() (params.CertificateBundle, error)

RootCABundle provides a mock function with given fields:

func (*PoolManager) Start

func (_m *PoolManager) Start() error

Start provides a mock function with given fields:

func (*PoolManager) Status

func (_m *PoolManager) Status() params.PoolManagerStatus

Status provides a mock function with given fields:

func (*PoolManager) Stop

func (_m *PoolManager) Stop() error

Stop provides a mock function with given fields:

func (*PoolManager) UninstallWebhook added in v0.1.4

func (_m *PoolManager) UninstallWebhook(ctx context.Context) error

UninstallWebhook provides a mock function with given fields: ctx

func (*PoolManager) Wait

func (_m *PoolManager) Wait() error

Wait provides a mock function with given fields:

func (*PoolManager) WebhookSecret

func (_m *PoolManager) WebhookSecret() string

WebhookSecret provides a mock function with given fields:

type Provider

type Provider struct {
	mock.Mock
}

Provider is an autogenerated mock type for the Provider type

func NewProvider

func NewProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *Provider

NewProvider creates a new instance of Provider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Provider) AsParams

func (_m *Provider) AsParams() params.Provider

AsParams provides a mock function with given fields:

func (*Provider) CreateInstance

CreateInstance provides a mock function with given fields: ctx, bootstrapParams

func (*Provider) DeleteInstance

func (_m *Provider) DeleteInstance(ctx context.Context, instance string) error

DeleteInstance provides a mock function with given fields: ctx, instance

func (*Provider) DisableJITConfig added in v0.1.4

func (_m *Provider) DisableJITConfig() bool

DisableJITConfig provides a mock function with given fields:

func (*Provider) GetInstance

GetInstance provides a mock function with given fields: ctx, instance

func (*Provider) ListInstances

func (_m *Provider) ListInstances(ctx context.Context, poolID string) ([]garm_provider_commonparams.ProviderInstance, error)

ListInstances provides a mock function with given fields: ctx, poolID

func (*Provider) RemoveAllInstances

func (_m *Provider) RemoveAllInstances(ctx context.Context) error

RemoveAllInstances provides a mock function with given fields: ctx

func (*Provider) Start

func (_m *Provider) Start(ctx context.Context, instance string) error

Start provides a mock function with given fields: ctx, instance

func (*Provider) Stop

func (_m *Provider) Stop(ctx context.Context, instance string) error

Stop provides a mock function with given fields: ctx, instance

type RepositoryHooks added in v0.1.4

type RepositoryHooks struct {
	mock.Mock
}

RepositoryHooks is an autogenerated mock type for the RepositoryHooks type

func NewRepositoryHooks added in v0.1.4

func NewRepositoryHooks(t interface {
	mock.TestingT
	Cleanup(func())
}) *RepositoryHooks

NewRepositoryHooks creates a new instance of RepositoryHooks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*RepositoryHooks) CreateRepoHook added in v0.1.4

func (_m *RepositoryHooks) CreateRepoHook(ctx context.Context, owner string, repo string, hook *github.Hook) (*github.Hook, *github.Response, error)

CreateRepoHook provides a mock function with given fields: ctx, owner, repo, hook

func (*RepositoryHooks) DeleteRepoHook added in v0.1.4

func (_m *RepositoryHooks) DeleteRepoHook(ctx context.Context, owner string, repo string, id int64) (*github.Response, error)

DeleteRepoHook provides a mock function with given fields: ctx, owner, repo, id

func (*RepositoryHooks) GetRepoHook added in v0.1.4

func (_m *RepositoryHooks) GetRepoHook(ctx context.Context, owner string, repo string, id int64) (*github.Hook, *github.Response, error)

GetRepoHook provides a mock function with given fields: ctx, owner, repo, id

func (*RepositoryHooks) ListRepoHooks added in v0.1.4

func (_m *RepositoryHooks) ListRepoHooks(ctx context.Context, owner string, repo string, opts *github.ListOptions) ([]*github.Hook, *github.Response, error)

ListRepoHooks provides a mock function with given fields: ctx, owner, repo, opts

func (*RepositoryHooks) PingRepoHook added in v0.1.4

func (_m *RepositoryHooks) PingRepoHook(ctx context.Context, owner string, repo string, id int64) (*github.Response, error)

PingRepoHook provides a mock function with given fields: ctx, owner, repo, id

Jump to

Keyboard shortcuts

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