187 lines
5.6 KiB
Go
187 lines
5.6 KiB
Go
// Code generated by mockery v2.28.1. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
|
|
github "github.com/google/go-github/v57/github"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// RepositoryHooks is an autogenerated mock type for the RepositoryHooks type
|
|
type RepositoryHooks struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// CreateRepoHook provides a mock function with given fields: ctx, owner, repo, hook
|
|
func (_m *RepositoryHooks) CreateRepoHook(ctx context.Context, owner string, repo string, hook *github.Hook) (*github.Hook, *github.Response, error) {
|
|
ret := _m.Called(ctx, owner, repo, hook)
|
|
|
|
var r0 *github.Hook
|
|
var r1 *github.Response
|
|
var r2 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, *github.Hook) (*github.Hook, *github.Response, error)); ok {
|
|
return rf(ctx, owner, repo, hook)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, *github.Hook) *github.Hook); ok {
|
|
r0 = rf(ctx, owner, repo, hook)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*github.Hook)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, *github.Hook) *github.Response); ok {
|
|
r1 = rf(ctx, owner, repo, hook)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*github.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(2).(func(context.Context, string, string, *github.Hook) error); ok {
|
|
r2 = rf(ctx, owner, repo, hook)
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// DeleteRepoHook provides a mock function with given fields: ctx, owner, repo, id
|
|
func (_m *RepositoryHooks) DeleteRepoHook(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
|
|
}
|
|
|
|
// GetRepoHook provides a mock function with given fields: ctx, owner, repo, id
|
|
func (_m *RepositoryHooks) GetRepoHook(ctx context.Context, owner string, repo string, id int64) (*github.Hook, *github.Response, error) {
|
|
ret := _m.Called(ctx, owner, repo, id)
|
|
|
|
var r0 *github.Hook
|
|
var r1 *github.Response
|
|
var r2 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) (*github.Hook, *github.Response, error)); ok {
|
|
return rf(ctx, owner, repo, id)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64) *github.Hook); ok {
|
|
r0 = rf(ctx, owner, repo, id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*github.Hook)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, int64) *github.Response); ok {
|
|
r1 = rf(ctx, owner, repo, id)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*github.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(2).(func(context.Context, string, string, int64) error); ok {
|
|
r2 = rf(ctx, owner, repo, id)
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// ListRepoHooks provides a mock function with given fields: ctx, owner, repo, opts
|
|
func (_m *RepositoryHooks) ListRepoHooks(ctx context.Context, owner string, repo string, opts *github.ListOptions) ([]*github.Hook, *github.Response, error) {
|
|
ret := _m.Called(ctx, owner, repo, opts)
|
|
|
|
var r0 []*github.Hook
|
|
var r1 *github.Response
|
|
var r2 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, *github.ListOptions) ([]*github.Hook, *github.Response, error)); ok {
|
|
return rf(ctx, owner, repo, opts)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string, *github.ListOptions) []*github.Hook); ok {
|
|
r0 = rf(ctx, owner, repo, opts)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*github.Hook)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, string, *github.ListOptions) *github.Response); ok {
|
|
r1 = rf(ctx, owner, repo, opts)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*github.Response)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(2).(func(context.Context, string, string, *github.ListOptions) error); ok {
|
|
r2 = rf(ctx, owner, repo, opts)
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
type mockConstructorTestingTNewRepositoryHooks interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// 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 NewRepositoryHooks(t mockConstructorTestingTNewRepositoryHooks) *RepositoryHooks {
|
|
mock := &RepositoryHooks{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|