aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb/database_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-08 04:19:01 +0800
committerobscuren <geffobscura@gmail.com>2015-04-08 04:19:01 +0800
commit7f32a08b6095bb5f1ff58168be70326ee0c29266 (patch)
tree8fec3ed0cb6ee6a99942f8ad699c85f8d204339b /ethdb/database_test.go
parent758205b187e079080193c2fed2a21caff2377329 (diff)
downloadgo-tangerine-7f32a08b6095bb5f1ff58168be70326ee0c29266.tar
go-tangerine-7f32a08b6095bb5f1ff58168be70326ee0c29266.tar.gz
go-tangerine-7f32a08b6095bb5f1ff58168be70326ee0c29266.tar.bz2
go-tangerine-7f32a08b6095bb5f1ff58168be70326ee0c29266.tar.lz
go-tangerine-7f32a08b6095bb5f1ff58168be70326ee0c29266.tar.xz
go-tangerine-7f32a08b6095bb5f1ff58168be70326ee0c29266.tar.zst
go-tangerine-7f32a08b6095bb5f1ff58168be70326ee0c29266.zip
Queued level db writes and batch writes. Closes #647
Diffstat (limited to 'ethdb/database_test.go')
-rw-r--r--ethdb/database_test.go27
1 files changed, 10 insertions, 17 deletions
diff --git a/ethdb/database_test.go b/ethdb/database_test.go
index 7de30fd81..3cead8bcd 100644
--- a/ethdb/database_test.go
+++ b/ethdb/database_test.go
@@ -1,26 +1,19 @@
package ethdb
-/*
import (
- "bytes"
- "testing"
+ "os"
+ "path"
+
+ "github.com/ethereum/go-ethereum/common"
)
-func TestCompression(t *testing.T) {
- db, err := NewLDBDatabase("testdb")
- if err != nil {
- t.Fatal(err)
+func newDb() *LDBDatabase {
+ file := path.Join("/", "tmp", "ldbtesttmpfile")
+ if common.FileExist(file) {
+ os.RemoveAll(file)
}
- in := make([]byte, 10)
- db.Put([]byte("test1"), in)
- out, err := db.Get([]byte("test1"))
- if err != nil {
- t.Fatal(err)
- }
+ db, _ := NewLDBDatabase(file)
- if bytes.Compare(out, in) != 0 {
- t.Error("put get", in, out)
- }
+ return db
}
-*/