diff --git a/runner/common/mocks/GithubClient.go b/runner/common/mocks/GithubClient.go index 918c60ff..b8f450e7 100644 --- a/runner/common/mocks/GithubClient.go +++ b/runner/common/mocks/GithubClient.go @@ -451,6 +451,41 @@ func (_m *GithubClient) ListOrganizationRunnerApplicationDownloads(ctx context.C return r0, r1, r2 } +// ListOrganizationRunnerGroups provides a mock function with given fields: ctx, org, opts +func (_m *GithubClient) ListOrganizationRunnerGroups(ctx context.Context, org string, opts *github.ListOrgRunnerGroupOptions) (*github.RunnerGroups, *github.Response, error) { + ret := _m.Called(ctx, org, opts) + + var r0 *github.RunnerGroups + var r1 *github.Response + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, *github.ListOrgRunnerGroupOptions) (*github.RunnerGroups, *github.Response, error)); ok { + return rf(ctx, org, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, string, *github.ListOrgRunnerGroupOptions) *github.RunnerGroups); ok { + r0 = rf(ctx, org, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*github.RunnerGroups) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, *github.ListOrgRunnerGroupOptions) *github.Response); ok { + r1 = rf(ctx, org, opts) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*github.Response) + } + } + + if rf, ok := ret.Get(2).(func(context.Context, string, *github.ListOrgRunnerGroupOptions) error); ok { + r2 = rf(ctx, org, opts) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + // ListOrganizationRunners provides a mock function with given fields: ctx, owner, opts func (_m *GithubClient) ListOrganizationRunners(ctx context.Context, owner string, opts *github.ListOptions) (*github.Runners, *github.Response, error) { ret := _m.Called(ctx, owner, opts) diff --git a/runner/common/mocks/GithubEnterpriseClient.go b/runner/common/mocks/GithubEnterpriseClient.go index 0a0e6bca..2fc1442a 100644 --- a/runner/common/mocks/GithubEnterpriseClient.go +++ b/runner/common/mocks/GithubEnterpriseClient.go @@ -49,6 +49,41 @@ func (_m *GithubEnterpriseClient) CreateRegistrationToken(ctx context.Context, e return r0, r1, r2 } +// GenerateEnterpriseJITConfig provides a mock function with given fields: ctx, enterprise, request +func (_m *GithubEnterpriseClient) GenerateEnterpriseJITConfig(ctx context.Context, enterprise string, request *github.GenerateJITConfigRequest) (*github.JITRunnerConfig, *github.Response, error) { + ret := _m.Called(ctx, enterprise, request) + + var r0 *github.JITRunnerConfig + var r1 *github.Response + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, *github.GenerateJITConfigRequest) (*github.JITRunnerConfig, *github.Response, error)); ok { + return rf(ctx, enterprise, request) + } + if rf, ok := ret.Get(0).(func(context.Context, string, *github.GenerateJITConfigRequest) *github.JITRunnerConfig); ok { + r0 = rf(ctx, enterprise, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*github.JITRunnerConfig) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, *github.GenerateJITConfigRequest) *github.Response); ok { + r1 = rf(ctx, enterprise, request) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*github.Response) + } + } + + if rf, ok := ret.Get(2).(func(context.Context, string, *github.GenerateJITConfigRequest) error); ok { + r2 = rf(ctx, enterprise, request) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + // ListRunnerApplicationDownloads provides a mock function with given fields: ctx, enterprise func (_m *GithubEnterpriseClient) ListRunnerApplicationDownloads(ctx context.Context, enterprise string) ([]*github.RunnerApplicationDownload, *github.Response, error) { ret := _m.Called(ctx, enterprise) @@ -84,6 +119,41 @@ func (_m *GithubEnterpriseClient) ListRunnerApplicationDownloads(ctx context.Con return r0, r1, r2 } +// ListRunnerGroups provides a mock function with given fields: ctx, enterprise, opts +func (_m *GithubEnterpriseClient) ListRunnerGroups(ctx context.Context, enterprise string, opts *github.ListEnterpriseRunnerGroupOptions) (*github.EnterpriseRunnerGroups, *github.Response, error) { + ret := _m.Called(ctx, enterprise, opts) + + var r0 *github.EnterpriseRunnerGroups + var r1 *github.Response + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, *github.ListEnterpriseRunnerGroupOptions) (*github.EnterpriseRunnerGroups, *github.Response, error)); ok { + return rf(ctx, enterprise, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, string, *github.ListEnterpriseRunnerGroupOptions) *github.EnterpriseRunnerGroups); ok { + r0 = rf(ctx, enterprise, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*github.EnterpriseRunnerGroups) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, *github.ListEnterpriseRunnerGroupOptions) *github.Response); ok { + r1 = rf(ctx, enterprise, opts) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*github.Response) + } + } + + if rf, ok := ret.Get(2).(func(context.Context, string, *github.ListEnterpriseRunnerGroupOptions) error); ok { + r2 = rf(ctx, enterprise, opts) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + // ListRunners provides a mock function with given fields: ctx, enterprise, opts func (_m *GithubEnterpriseClient) ListRunners(ctx context.Context, enterprise string, opts *github.ListOptions) (*github.Runners, *github.Response, error) { ret := _m.Called(ctx, enterprise, opts)