Alejandro Lopez
65c72f3e0b
Some checks failed
Build / Build Components (1.19) (pull_request) Successful in 2m8s
Build / Build Components (1.20) (pull_request) Successful in 1m54s
Tests and linters / Lint (pull_request) Successful in 2m48s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m53s
Tests and linters / Tests (1.20) (pull_request) Successful in 2m4s
Tests and linters / Tests with -race (pull_request) Successful in 5m21s
Tests and linters / Staticcheck (pull_request) Successful in 2m16s
Vulncheck / Vulncheck (pull_request) Failing after 16m3s
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
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)
|
|
}
|