forked from TrueCloudLab/frostfs-node
[#1840] neofs-node: Use blobstor paths to identify shard
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
4b005d3178
commit
2d43892fc9
3 changed files with 52 additions and 25 deletions
|
@ -147,19 +147,18 @@ func engineWithShards(t *testing.T, path string, num int) (*StorageEngine, []str
|
|||
|
||||
e := New()
|
||||
for i := 0; i < num; i++ {
|
||||
metaPath := filepath.Join(addPath, fmt.Sprintf("%d.metabase", i))
|
||||
currShards = append(currShards, metaPath)
|
||||
|
||||
_, err := e.AddShard(
|
||||
id, err := e.AddShard(
|
||||
shard.WithBlobStorOptions(
|
||||
blobstor.WithStorages(newStorages(filepath.Join(addPath, strconv.Itoa(i)), errSmallSize))),
|
||||
shard.WithMetaBaseOptions(
|
||||
meta.WithPath(metaPath),
|
||||
meta.WithPath(filepath.Join(addPath, fmt.Sprintf("%d.metabase", i))),
|
||||
meta.WithPermissions(0700),
|
||||
meta.WithEpochState(epochState{}),
|
||||
),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
currShards = append(currShards, calculateShardID(e.shards[id.String()].DumpInfo()))
|
||||
}
|
||||
|
||||
require.Equal(t, num, len(e.shards))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue