Test: download file in filesystem

This commit is contained in:
HFO4
2019-11-27 13:54:25 +08:00
parent 9bb432c220
commit 16067c3ac8
6 changed files with 138 additions and 5 deletions

View File

@@ -19,6 +19,11 @@ type FileHeaderMock struct {
testMock.Mock
}
func (m FileHeaderMock) Get(ctx context.Context, path string) (io.ReadSeeker, error) {
args := m.Called(ctx, path)
return args.Get(0).(io.ReadSeeker), args.Error(1)
}
func (m FileHeaderMock) Put(ctx context.Context, file io.ReadCloser, dst string, size uint64) error {
args := m.Called(ctx, file, dst)
return args.Error(0)