[#139] test: Add test storage implementation
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
This aims to reduce the usage of chmod hackery to induce or simulate OS-related failures. Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
e843e7f090
commit
341fe1688f
20 changed files with 617 additions and 208 deletions
|
@ -1,23 +1,16 @@
|
|||
package blobstor
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/storagetest"
|
||||
)
|
||||
|
||||
func TestGeneric(t *testing.T) {
|
||||
defer func() { _ = os.RemoveAll(t.Name()) }()
|
||||
|
||||
var n int
|
||||
newMetabase := func(t *testing.T) storagetest.Component {
|
||||
n++
|
||||
dir := filepath.Join(t.Name(), strconv.Itoa(n))
|
||||
return New(
|
||||
WithStorages(defaultStorages(dir, 128)))
|
||||
WithStorages(defaultStorages(t.TempDir(), 128)))
|
||||
}
|
||||
|
||||
storagetest.TestAll(t, newMetabase)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue