forked from TrueCloudLab/frostfs-node
41 lines
924 B
Go
41 lines
924 B
Go
package fstree
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/common"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/internal/blobstortest"
|
|
)
|
|
|
|
func TestGeneric(t *testing.T) {
|
|
newTreeFromPath := func(path string) common.Storage {
|
|
return New(
|
|
WithPath(path),
|
|
WithDepth(2),
|
|
WithDirNameLen(2))
|
|
}
|
|
|
|
newTree := func(t *testing.T) common.Storage {
|
|
return newTreeFromPath(t.TempDir())
|
|
}
|
|
|
|
blobstortest.TestAll(t, newTree, 2048, 16*1024)
|
|
|
|
t.Run("info", func(t *testing.T) {
|
|
path := t.TempDir()
|
|
blobstortest.TestInfo(t, func(*testing.T) common.Storage {
|
|
return newTreeFromPath(path)
|
|
}, Type, path)
|
|
})
|
|
}
|
|
|
|
func TestControl(t *testing.T) {
|
|
newTree := func(t *testing.T) common.Storage {
|
|
return New(
|
|
WithPath(t.TempDir()),
|
|
WithDepth(2),
|
|
WithDirNameLen(2))
|
|
}
|
|
|
|
blobstortest.TestControl(t, newTree, 2048, 2048)
|
|
}
|