|
|
@ -78,7 +78,7 @@ func TestMailServer(t *testing.T) { |
|
|
|
const password = "password_for_this_test" |
|
|
|
const password = "password_for_this_test" |
|
|
|
const dbPath = "whisper-server-test" |
|
|
|
const dbPath = "whisper-server-test" |
|
|
|
|
|
|
|
|
|
|
|
_, err := ioutil.TempDir("", dbPath) |
|
|
|
dir, err := ioutil.TempDir("", dbPath) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
t.Fatal(err) |
|
|
|
t.Fatal(err) |
|
|
|
} |
|
|
|
} |
|
|
@ -87,7 +87,7 @@ func TestMailServer(t *testing.T) { |
|
|
|
shh = whisper.New() |
|
|
|
shh = whisper.New() |
|
|
|
shh.RegisterServer(&server) |
|
|
|
shh.RegisterServer(&server) |
|
|
|
|
|
|
|
|
|
|
|
server.Init(shh, dbPath, password, powRequirement) |
|
|
|
server.Init(shh, dir, password, powRequirement) |
|
|
|
defer server.Close() |
|
|
|
defer server.Close() |
|
|
|
|
|
|
|
|
|
|
|
err = shh.AddSymKey(keyName, []byte(password)) |
|
|
|
err = shh.AddSymKey(keyName, []byte(password)) |
|
|
|