@ -16,8 +16,7 @@ import (
func TestCreateAndFind ( t * testing . T ) {
func TestCreateAndFind ( t * testing . T ) {
testFiler := filer . NewFiler ( nil , nil , "" , 0 , "" , "" , "" , nil )
testFiler := filer . NewFiler ( nil , nil , "" , 0 , "" , "" , "" , nil )
dir , _ := os . MkdirTemp ( "" , "seaweedfs_filer_test" )
defer os . RemoveAll ( dir )
dir := t . TempDir ( )
store := & RocksDBStore { }
store := & RocksDBStore { }
store . initialize ( dir )
store . initialize ( dir )
testFiler . SetStore ( store )
testFiler . SetStore ( store )
@ -70,8 +69,7 @@ func TestCreateAndFind(t *testing.T) {
func TestEmptyRoot ( t * testing . T ) {
func TestEmptyRoot ( t * testing . T ) {
testFiler := filer . NewFiler ( nil , nil , "" , 0 , "" , "" , "" , nil )
testFiler := filer . NewFiler ( nil , nil , "" , 0 , "" , "" , "" , nil )
dir , _ := os . MkdirTemp ( "" , "seaweedfs_filer_test2" )
defer os . RemoveAll ( dir )
dir := t . TempDir ( )
store := & RocksDBStore { }
store := & RocksDBStore { }
store . initialize ( dir )
store . initialize ( dir )
testFiler . SetStore ( store )
testFiler . SetStore ( store )
@ -93,8 +91,7 @@ func TestEmptyRoot(t *testing.T) {
func BenchmarkInsertEntry ( b * testing . B ) {
func BenchmarkInsertEntry ( b * testing . B ) {
testFiler := filer . NewFiler ( nil , nil , "" , 0 , "" , "" , "" , nil )
testFiler := filer . NewFiler ( nil , nil , "" , 0 , "" , "" , "" , nil )
dir , _ := os . MkdirTemp ( "" , "seaweedfs_filer_bench" )
defer os . RemoveAll ( dir )
dir := b . TempDir ( )
store := & RocksDBStore { }
store := & RocksDBStore { }
store . initialize ( dir )
store . initialize ( dir )
testFiler . SetStore ( store )
testFiler . SetStore ( store )