diff --git a/runner/common/mocks/GithubClient.go b/runner/common/mocks/GithubClient.go index ebd442ba..bfcada29 100644 --- a/runner/common/mocks/GithubClient.go +++ b/runner/common/mocks/GithubClient.go @@ -521,6 +521,58 @@ func (_m *GithubClient) ListRunners(ctx context.Context, owner string, repo stri return r0, r1, r2 } +// PingOrgHook provides a mock function with given fields: ctx, org, id +func (_m *GithubClient) PingOrgHook(ctx context.Context, org string, id int64) (*github.Response, error) { + ret := _m.Called(ctx, org, id) + + var r0 *github.Response + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, int64) (*github.Response, error)); ok { + return rf(ctx, org, id) + } + if rf, ok := ret.Get(0).(func(context.Context, string, int64) *github.Response); ok { + r0 = rf(ctx, org, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*github.Response) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok { + r1 = rf(ctx, org, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PingRepoHook provides a mock function with given fields: ctx, owner, repo, id +func (_m *GithubClient) PingRepoHook(ctx context.Context, owner string, repo string, id int64) (*github.Response, error) { + ret := _m.Called(ctx, owner, repo, id) + + var r0 *github.Response + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) (*github.Response, error)); ok { + return rf(ctx, owner, repo, id) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) *github.Response); ok { + r0 = rf(ctx, owner, repo, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*github.Response) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) error); ok { + r1 = rf(ctx, owner, repo, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // RemoveOrganizationRunner provides a mock function with given fields: ctx, owner, runnerID func (_m *GithubClient) RemoveOrganizationRunner(ctx context.Context, owner string, runnerID int64) (*github.Response, error) { ret := _m.Called(ctx, owner, runnerID) diff --git a/runner/common/mocks/OrganizationHooks.go b/runner/common/mocks/OrganizationHooks.go index 4d891f0b..c19a7b68 100644 --- a/runner/common/mocks/OrganizationHooks.go +++ b/runner/common/mocks/OrganizationHooks.go @@ -145,6 +145,32 @@ func (_m *OrganizationHooks) ListOrgHooks(ctx context.Context, org string, opts return r0, r1, r2 } +// PingOrgHook provides a mock function with given fields: ctx, org, id +func (_m *OrganizationHooks) PingOrgHook(ctx context.Context, org string, id int64) (*github.Response, error) { + ret := _m.Called(ctx, org, id) + + var r0 *github.Response + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, int64) (*github.Response, error)); ok { + return rf(ctx, org, id) + } + if rf, ok := ret.Get(0).(func(context.Context, string, int64) *github.Response); ok { + r0 = rf(ctx, org, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*github.Response) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, int64) error); ok { + r1 = rf(ctx, org, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // 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 NewOrganizationHooks(t interface { diff --git a/runner/common/mocks/RepositoryHooks.go b/runner/common/mocks/RepositoryHooks.go index ab9f1496..800a48c5 100644 --- a/runner/common/mocks/RepositoryHooks.go +++ b/runner/common/mocks/RepositoryHooks.go @@ -145,6 +145,32 @@ func (_m *RepositoryHooks) ListRepoHooks(ctx context.Context, owner string, repo return r0, r1, r2 } +// PingRepoHook provides a mock function with given fields: ctx, owner, repo, id +func (_m *RepositoryHooks) PingRepoHook(ctx context.Context, owner string, repo string, id int64) (*github.Response, error) { + ret := _m.Called(ctx, owner, repo, id) + + var r0 *github.Response + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) (*github.Response, error)); ok { + return rf(ctx, owner, repo, id) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) *github.Response); ok { + r0 = rf(ctx, owner, repo, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*github.Response) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) error); ok { + r1 = rf(ctx, owner, repo, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // 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 NewRepositoryHooks(t interface {