| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| mock "github.com/stretchr/testify/mock" |
| ) |
| |
| // CAS is an autogenerated mock type for the CAS type |
| type CAS struct { |
| mock.Mock |
| } |
| |
| // Close provides a mock function with given fields: |
| func (_m *CAS) Close() error { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Close") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func() error); ok { |
| r0 = rf() |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // Download provides a mock function with given fields: ctx, root, digest |
| func (_m *CAS) Download(ctx context.Context, root string, digest string) error { |
| ret := _m.Called(ctx, root, digest) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Download") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { |
| r0 = rf(ctx, root, digest) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // Merge provides a mock function with given fields: ctx, digests |
| func (_m *CAS) Merge(ctx context.Context, digests []string) (string, error) { |
| ret := _m.Called(ctx, digests) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Merge") |
| } |
| |
| var r0 string |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, []string) (string, error)); ok { |
| return rf(ctx, digests) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, []string) string); ok { |
| r0 = rf(ctx, digests) |
| } else { |
| r0 = ret.Get(0).(string) |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok { |
| r1 = rf(ctx, digests) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // Upload provides a mock function with given fields: ctx, root, paths, excludes |
| func (_m *CAS) Upload(ctx context.Context, root string, paths []string, excludes []string) (string, error) { |
| ret := _m.Called(ctx, root, paths, excludes) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Upload") |
| } |
| |
| var r0 string |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, string, []string, []string) (string, error)); ok { |
| return rf(ctx, root, paths, excludes) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, string, []string, []string) string); ok { |
| r0 = rf(ctx, root, paths, excludes) |
| } else { |
| r0 = ret.Get(0).(string) |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, string, []string, []string) error); ok { |
| r1 = rf(ctx, root, paths, excludes) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // NewCAS creates a new instance of CAS. 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 NewCAS(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *CAS { |
| mock := &CAS{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |