forked from cerc-io/plugeth
p2p/discover: fix database presistency test folder
This commit is contained in:
parent
f1cc3619f5
commit
af24c271c7
@ -243,7 +243,7 @@ func TestNodeDBPersistency(t *testing.T) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Create a persistent database and store some values
|
// Create a persistent database and store some values
|
||||||
db, err := newNodeDB(filepath.Join("root", "database"), Version)
|
db, err := newNodeDB(filepath.Join(root, "database"), Version)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("failed to create persistent database: %v", err)
|
t.Fatalf("failed to create persistent database: %v", err)
|
||||||
}
|
}
|
||||||
@ -253,7 +253,7 @@ func TestNodeDBPersistency(t *testing.T) {
|
|||||||
db.close()
|
db.close()
|
||||||
|
|
||||||
// Reopen the database and check the value
|
// Reopen the database and check the value
|
||||||
db, err = newNodeDB(filepath.Join("root", "database"), Version)
|
db, err = newNodeDB(filepath.Join(root, "database"), Version)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("failed to open persistent database: %v", err)
|
t.Fatalf("failed to open persistent database: %v", err)
|
||||||
}
|
}
|
||||||
@ -263,7 +263,7 @@ func TestNodeDBPersistency(t *testing.T) {
|
|||||||
db.close()
|
db.close()
|
||||||
|
|
||||||
// Change the database version and check flush
|
// Change the database version and check flush
|
||||||
db, err = newNodeDB(filepath.Join("root", "database"), Version+1)
|
db, err = newNodeDB(filepath.Join(root, "database"), Version+1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("failed to open persistent database: %v", err)
|
t.Fatalf("failed to open persistent database: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user