github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/pkg/jenkins/mocks/Artifact.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 mock "github.com/stretchr/testify/mock" 9 ) 10 11 // Artifact is an autogenerated mock type for the Artifact type 12 type Artifact struct { 13 mock.Mock 14 } 15 16 // FileName provides a mock function with given fields: 17 func (_m *Artifact) FileName() string { 18 ret := _m.Called() 19 20 var r0 string 21 if rf, ok := ret.Get(0).(func() string); ok { 22 r0 = rf() 23 } else { 24 r0 = ret.Get(0).(string) 25 } 26 27 return r0 28 } 29 30 // GetData provides a mock function with given fields: ctx 31 func (_m *Artifact) GetData(ctx context.Context) ([]byte, error) { 32 ret := _m.Called(ctx) 33 34 var r0 []byte 35 if rf, ok := ret.Get(0).(func(context.Context) []byte); ok { 36 r0 = rf(ctx) 37 } else { 38 if ret.Get(0) != nil { 39 r0 = ret.Get(0).([]byte) 40 } 41 } 42 43 var r1 error 44 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 45 r1 = rf(ctx) 46 } else { 47 r1 = ret.Error(1) 48 } 49 50 return r0, r1 51 } 52 53 // Save provides a mock function with given fields: ctx, path 54 func (_m *Artifact) Save(ctx context.Context, path string) (bool, error) { 55 ret := _m.Called(ctx, path) 56 57 var r0 bool 58 if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok { 59 r0 = rf(ctx, path) 60 } else { 61 r0 = ret.Get(0).(bool) 62 } 63 64 var r1 error 65 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 66 r1 = rf(ctx, path) 67 } else { 68 r1 = ret.Error(1) 69 } 70 71 return r0, r1 72 } 73 74 // SaveToDir provides a mock function with given fields: ctx, dir 75 func (_m *Artifact) SaveToDir(ctx context.Context, dir string) (bool, error) { 76 ret := _m.Called(ctx, dir) 77 78 var r0 bool 79 if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok { 80 r0 = rf(ctx, dir) 81 } else { 82 r0 = ret.Get(0).(bool) 83 } 84 85 var r1 error 86 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 87 r1 = rf(ctx, dir) 88 } else { 89 r1 = ret.Error(1) 90 } 91 92 return r0, r1 93 }