forked from TrueCloudLab/frostfs-node
[#85] get-service: Drop unused assemble flag
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
b8e93d4c08
commit
ac0a278a05
3 changed files with 1 additions and 14 deletions
|
@ -115,7 +115,7 @@ func (exec execCtx) key() (*ecdsa.PrivateKey, error) {
|
|||
}
|
||||
|
||||
func (exec *execCtx) canAssemble() bool {
|
||||
return exec.svc.assembly && !exec.isRaw() && !exec.headOnly() && !exec.isLocal()
|
||||
return !exec.isRaw() && !exec.headOnly() && !exec.isLocal()
|
||||
}
|
||||
|
||||
func (exec *execCtx) splitInfo() *objectSDK.SplitInfo {
|
||||
|
|
|
@ -248,7 +248,6 @@ func TestGetLocalOnly(t *testing.T) {
|
|||
svc := &Service{cfg: new(cfg)}
|
||||
svc.log = test.NewLogger(false)
|
||||
svc.localStorage = storage
|
||||
svc.assembly = true
|
||||
|
||||
return svc
|
||||
}
|
||||
|
@ -510,7 +509,6 @@ func TestGetRemoteSmall(t *testing.T) {
|
|||
svc := &Service{cfg: new(cfg)}
|
||||
svc.log = test.NewLogger(false)
|
||||
svc.localStorage = newTestStorage()
|
||||
svc.assembly = true
|
||||
|
||||
const curEpoch = 13
|
||||
|
||||
|
@ -1644,7 +1642,6 @@ func TestGetFromPastEpoch(t *testing.T) {
|
|||
svc := &Service{cfg: new(cfg)}
|
||||
svc.log = test.NewLogger(false)
|
||||
svc.localStorage = newTestStorage()
|
||||
svc.assembly = true
|
||||
|
||||
const curEpoch = 13
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@ type getClient interface {
|
|||
}
|
||||
|
||||
type cfg struct {
|
||||
assembly bool
|
||||
|
||||
log *logger.Logger
|
||||
|
||||
localStorage interface {
|
||||
|
@ -51,7 +49,6 @@ type cfg struct {
|
|||
|
||||
func defaultCfg() *cfg {
|
||||
return &cfg{
|
||||
assembly: true,
|
||||
log: &logger.Logger{Logger: zap.L()},
|
||||
localStorage: new(storageEngineWrapper),
|
||||
clientCache: new(clientCacheWrapper),
|
||||
|
@ -79,13 +76,6 @@ func WithLogger(l *logger.Logger) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithoutAssembly returns option to disable object assembling.
|
||||
func WithoutAssembly() Option {
|
||||
return func(c *cfg) {
|
||||
c.assembly = false
|
||||
}
|
||||
}
|
||||
|
||||
// WithLocalStorageEngine returns option to set local storage
|
||||
// instance.
|
||||
func WithLocalStorageEngine(e *engine.StorageEngine) Option {
|
||||
|
|
Loading…
Reference in a new issue