refactor(storage): read from local disk for putObject
This commit is contained in:
1 parent
7263d08bc5
commit
39a07252b6
10 files changed
+471
-1213
No files matched your search
@@ -35,6 +35,7 @@ type TestOption func(*TestOptions) error
|
||||
type TestOptions struct {
|
||||
withMockBuckets map[BucketName]Bucket
|
||||
withMockError []PluginMockError
|
||||
withChunkSize int
|
||||
}
|
||||
|
||||
// getTestOpts - iterate the inbound Options and return a struct
|
||||
@@ -49,7 +50,9 @@ func getTestOpts(opt ...TestOption) (TestOptions, error) {
|
||||
}
|
||||
|
||||
func getDefaultTestOptions() TestOptions {
|
||||
return TestOptions{}
|
||||
return TestOptions{
|
||||
withChunkSize: 8,
|
||||
}
|
||||
}
|
||||
|
||||
// WithMockBuckets provides an option to create mocked external object store buckets.
|
||||
@@ -67,3 +70,11 @@ func WithMockError(err PluginMockError) TestOption {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithChunkSize provides an option to set the chunkSize used for grpc streams.
|
||||
func WithChunkSize(size int) TestOption {
|
||||
return func(o *TestOptions) error {
|
||||
o.withChunkSize = size
|
||||
return nil
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user