mocks

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 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 mockConstructorTestingTNewGithubClient) *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.

func (*GithubClient) CreateOrgHook added in v0.1.4

func (_m *GithubClient) 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 (*GithubClient) CreateOrganizationRegistrationToken

func (_m *GithubClient) CreateOrganizationRegistrationToken(ctx context.Context, owner string) (*github.RegistrationToken, *github.Response, error)

CreateOrganizationRegistrationToken provides a mock function with given fields: ctx, owner

func (*GithubClient) CreateRegistrationToken

func (_m *GithubClient) CreateRegistrationToken(ctx context.Context, owner string, repo string) (*github.RegistrationToken, *github.Response, error)

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

func (*GithubClient) CreateRepoHook added in v0.1.4

func (_m *GithubClient) 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 (*GithubClient) DeleteOrgHook added in v0.1.4

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

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

func (*GithubClient) DeleteRepoHook added in v0.1.4

func (_m *GithubClient) 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 (*GithubClient) GenerateOrgJITConfig added in v0.1.4

func (_m *GithubClient) GenerateOrgJITConfig(ctx context.Context, owner string, request *github.GenerateJITConfigRequest) (*github.JITRunnerConfig, *github.Response, error)

GenerateOrgJITConfig provides a mock function with given fields: ctx, owner, request

func (*GithubClient) GenerateRepoJITConfig added in v0.1.4

func (_m *GithubClient) GenerateRepoJITConfig(ctx context.Context, owner string, repo string, request *github.GenerateJITConfigRequest) (*github.JITRunnerConfig, *github.Response, error)

GenerateRepoJITConfig provides a mock function with given fields: ctx, owner, repo, request

func (*GithubClient) GetOrgHook added in v0.1.4

func (_m *GithubClient) 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 (*GithubClient) GetRepoHook added in v0.1.4

func (_m *GithubClient) 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 (*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) ListOrgHooks added in v0.1.4

func (_m *GithubClient) 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 (*GithubClient) ListOrganizationRunnerApplicationDownloads

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

ListOrganizationRunnerApplicationDownloads provides a mock function with given fields: ctx, owner

func (*GithubClient) ListOrganizationRunnerGroups added in v0.1.4

func (_m *GithubClient) ListOrganizationRunnerGroups(ctx context.Context, org string, opts *github.ListOrgRunnerGroupOptions) (*github.RunnerGroups, *github.Response, error)

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

func (*GithubClient) ListOrganizationRunners

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

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

func (*GithubClient) ListRepoHooks added in v0.1.4

func (_m *GithubClient) 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 (*GithubClient) ListRunnerApplicationDownloads

func (_m *GithubClient) ListRunnerApplicationDownloads(ctx context.Context, owner string, repo string) ([]*github.RunnerApplicationDownload, *github.Response, error)

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

func (*GithubClient) ListRunners

func (_m *GithubClient) ListRunners(ctx context.Context, owner string, repo string, opts *github.ListOptions) (*github.Runners, *github.Response, error)

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

func (*GithubClient) PingOrgHook added in v0.1.4

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

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

func (*GithubClient) PingRepoHook added in v0.1.4

func (_m *GithubClient) 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

func (*GithubClient) RemoveOrganizationRunner

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

RemoveOrganizationRunner provides a mock function with given fields: ctx, owner, runnerID

func (*GithubClient) RemoveRunner

func (_m *GithubClient) RemoveRunner(ctx context.Context, owner string, repo string, runnerID int64) (*github.Response, error)

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

type GithubEnterpriseClient

type GithubEnterpriseClient struct {
	mock.Mock
}

GithubEnterpriseClient is an autogenerated mock type for the GithubEnterpriseClient type

func NewGithubEnterpriseClient

func NewGithubEnterpriseClient(t mockConstructorTestingTNewGithubEnterpriseClient) *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.

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 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 mockConstructorTestingTNewOrganizationHooks) *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.

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 mockConstructorTestingTNewPoolManager) *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.

func (*PoolManager) DeleteRunner added in v0.1.4

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

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

func (*PoolManager) ForceDeleteRunner

func (_m *PoolManager) ForceDeleteRunner(runner params.Instance) error

ForceDeleteRunner provides a mock function with given fields: runner

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) RefreshState

func (_m *PoolManager) RefreshState(param params.UpdatePoolStateParams) error

RefreshState provides a mock function with given fields: 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 mockConstructorTestingTNewProvider) *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.

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, force bool) error

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

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 mockConstructorTestingTNewRepositoryHooks) *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.

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