github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/pkg/jenkins/mocks/Jenkins.go (about) 1 // Code generated by mockery v2.7.5. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 gojenkins "github.com/bndr/gojenkins" 9 10 mock "github.com/stretchr/testify/mock" 11 ) 12 13 // Jenkins is an autogenerated mock type for the Jenkins type 14 type Jenkins struct { 15 mock.Mock 16 } 17 18 // BuildJob provides a mock function with given fields: ctx, name, params 19 func (_m *Jenkins) BuildJob(ctx context.Context, name string, params map[string]string) (int64, error) { 20 ret := _m.Called(ctx, name, params) 21 22 var r0 int64 23 if rf, ok := ret.Get(0).(func(context.Context, string, map[string]string) int64); ok { 24 r0 = rf(ctx, name, params) 25 } else { 26 r0 = ret.Get(0).(int64) 27 } 28 29 var r1 error 30 if rf, ok := ret.Get(1).(func(context.Context, string, map[string]string) error); ok { 31 r1 = rf(ctx, name, params) 32 } else { 33 r1 = ret.Error(1) 34 } 35 36 return r0, r1 37 } 38 39 // GetBuildFromQueueID provides a mock function with given fields: ctx, job, queueid 40 func (_m *Jenkins) GetBuildFromQueueID(ctx context.Context, job *gojenkins.Job, queueid int64) (*gojenkins.Build, error) { 41 ret := _m.Called(ctx, job, queueid) 42 43 var r0 *gojenkins.Build 44 if rf, ok := ret.Get(0).(func(context.Context, *gojenkins.Job, int64) *gojenkins.Build); ok { 45 r0 = rf(ctx, job, queueid) 46 } else { 47 if ret.Get(0) != nil { 48 r0 = ret.Get(0).(*gojenkins.Build) 49 } 50 } 51 52 var r1 error 53 if rf, ok := ret.Get(1).(func(context.Context, *gojenkins.Job, int64) error); ok { 54 r1 = rf(ctx, job, queueid) 55 } else { 56 r1 = ret.Error(1) 57 } 58 59 return r0, r1 60 } 61 62 // GetJobObj provides a mock function with given fields: ctx, name 63 func (_m *Jenkins) GetJobObj(ctx context.Context, name string) *gojenkins.Job { 64 ret := _m.Called(ctx, name) 65 66 var r0 *gojenkins.Job 67 if rf, ok := ret.Get(0).(func(context.Context, string) *gojenkins.Job); ok { 68 r0 = rf(ctx, name) 69 } else { 70 if ret.Get(0) != nil { 71 r0 = ret.Get(0).(*gojenkins.Job) 72 } 73 } 74 75 return r0 76 }