forked from TrueCloudLab/frostfs-s3-gw
[#104] app: Reload copies numbers on SIGHUP
Signed-off-by: Artem Tataurov <a.tataurov@yadro.com>
This commit is contained in:
parent
11f30a037b
commit
9f186d9aba
7 changed files with 105 additions and 50 deletions
|
@ -7,14 +7,16 @@ import (
|
|||
)
|
||||
|
||||
func TestCopiesNumberPicker(t *testing.T) {
|
||||
var locConstraints = map[string][]uint32{}
|
||||
var locationConstraints = map[string][]uint32{}
|
||||
locationConstraint1 := "one"
|
||||
locationConstraint2 := "two"
|
||||
locConstraints[locationConstraint1] = []uint32{2, 3, 4}
|
||||
locationConstraints[locationConstraint1] = []uint32{2, 3, 4}
|
||||
|
||||
config := &Config{
|
||||
DefaultCopiesNumbers: []uint32{1},
|
||||
CopiesNumbers: locConstraints,
|
||||
Policy: &placementPolicyMock{
|
||||
copiesNumbers: locationConstraints,
|
||||
defaultCopiesNumbers: []uint32{1},
|
||||
},
|
||||
}
|
||||
h := handler{
|
||||
cfg: config,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue