diff options
author | Felix Lange <fjl@twurst.com> | 2016-09-29 20:24:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-29 20:24:37 +0800 |
commit | 44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308 (patch) | |
tree | aaab07e78f7b9341f0fcfbd9348fe96273bd6a0d /node/service_test.go | |
parent | 4e8cec05abb567457e80185cb9fcf7ec2cc90596 (diff) | |
parent | b42a5b118f1aa7ac1235547c8594146978941401 (diff) | |
download | go-tangerine-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar go-tangerine-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar.gz go-tangerine-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar.bz2 go-tangerine-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar.lz go-tangerine-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar.xz go-tangerine-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.tar.zst go-tangerine-44bc2e80ddf82ea2a37c25e7beb0ca06b46b7308.zip |
Merge pull request #2914 from fjl/node-coinhabit
cmd/utils, node: make datadir reusable for bzzd
Diffstat (limited to 'node/service_test.go')
-rw-r--r-- | node/service_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/node/service_test.go b/node/service_test.go index 7bd94a52e..a7ae439e0 100644 --- a/node/service_test.go +++ b/node/service_test.go @@ -38,18 +38,18 @@ func TestContextDatabases(t *testing.T) { t.Fatalf("non-created database already exists") } // Request the opening/creation of a database and ensure it persists to disk - ctx := &ServiceContext{datadir: dir} + ctx := &ServiceContext{config: &Config{Name: "unit-test", DataDir: dir}} db, err := ctx.OpenDatabase("persistent", 0, 0) if err != nil { t.Fatalf("failed to open persistent database: %v", err) } db.Close() - if _, err := os.Stat(filepath.Join(dir, "persistent")); err != nil { + if _, err := os.Stat(filepath.Join(dir, "unit-test", "persistent")); err != nil { t.Fatalf("persistent database doesn't exists: %v", err) } // Request th opening/creation of an ephemeral database and ensure it's not persisted - ctx = &ServiceContext{datadir: ""} + ctx = &ServiceContext{config: &Config{DataDir: ""}} db, err = ctx.OpenDatabase("ephemeral", 0, 0) if err != nil { t.Fatalf("failed to open ephemeral database: %v", err) |