[#1527] engine/test: Move default metabase options to separate function

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
Aleksey Savchuk 2024-12-02 16:12:12 +03:00
parent 60feed3b5f
commit 9cabca9dfe
Signed by: a-savchuk
GPG key ID: 70C0A7FF6F9C4639

View file

@ -89,12 +89,16 @@ func testGetDefaultShardOptions(t testing.TB) []shard.Option {
blobstor.WithLogger(test.NewLogger(t)), blobstor.WithLogger(test.NewLogger(t)),
), ),
shard.WithPiloramaOptions(pilorama.WithPath(filepath.Join(t.TempDir(), "pilorama"))), shard.WithPiloramaOptions(pilorama.WithPath(filepath.Join(t.TempDir(), "pilorama"))),
shard.WithMetaBaseOptions( shard.WithMetaBaseOptions(testGetDefaultMetabaseOptions(t)...),
}
}
func testGetDefaultMetabaseOptions(t testing.TB) []meta.Option {
return []meta.Option{
meta.WithPath(filepath.Join(t.TempDir(), "metabase")), meta.WithPath(filepath.Join(t.TempDir(), "metabase")),
meta.WithPermissions(0o700), meta.WithPermissions(0o700),
meta.WithEpochState(epochState{}), meta.WithEpochState(epochState{}),
meta.WithLogger(test.NewLogger(t)), meta.WithLogger(test.NewLogger(t)),
),
} }
} }