mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
fix tests for to work properly
Former-commit-id: 6aa5738d5a16ac31e3da71f11fba5b16643a105c [formerly 837b547034da7991eaaf4be82e436b74972eccb1] Former-commit-id: 6b8791f4ca9969f57fc89ac775e5bfda3cb7f518
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"math/big"
|
||||
"math/rand"
|
||||
"os"
|
||||
"path"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
@@ -80,11 +81,6 @@ func (s *FakeNetworkService) Version() (string, error) {
|
||||
}
|
||||
|
||||
func newTestServer(endpoint string) (*rpc.Server, error) {
|
||||
// Create datadir.
|
||||
if err := os.Mkdir(endpoint, 0777); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Create a default account without password.
|
||||
scryptN, scryptP, keydir, err := (&node.Config{DataDir: endpoint}).AccountConfig()
|
||||
if err != nil {
|
||||
@@ -118,7 +114,7 @@ func createContext() *cli.Context {
|
||||
}
|
||||
|
||||
func TestShardingClient(t *testing.T) {
|
||||
endpoint := fmt.Sprintf("%s/go-ethereum-test-ipc-%d-%d", os.TempDir(), os.Getpid(), rand.Int63())
|
||||
endpoint := path.Join(os.TempDir(), fmt.Sprintf("go-ethereum-test-ipc-%d-%d", os.Getpid(), rand.Int63()))
|
||||
server, err := newTestServer(endpoint)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create a test server: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user