swarm: network rewrite merge
This commit is contained in:
@ -33,9 +33,10 @@ func TestConfig(t *testing.T) {
|
||||
t.Fatalf("failed to load private key: %v", err)
|
||||
}
|
||||
|
||||
one := NewDefaultConfig()
|
||||
two := NewDefaultConfig()
|
||||
one := NewConfig()
|
||||
two := NewConfig()
|
||||
|
||||
one.LocalStoreParams = two.LocalStoreParams
|
||||
if equal := reflect.DeepEqual(one, two); !equal {
|
||||
t.Fatal("Two default configs are not equal")
|
||||
}
|
||||
@ -49,21 +50,10 @@ func TestConfig(t *testing.T) {
|
||||
if one.PublicKey == "" {
|
||||
t.Fatal("Expected PublicKey to be set")
|
||||
}
|
||||
|
||||
//the Init function should append subdirs to the given path
|
||||
if one.Swap.PayProfile.Beneficiary == (common.Address{}) {
|
||||
if one.Swap.PayProfile.Beneficiary == (common.Address{}) && one.SwapEnabled {
|
||||
t.Fatal("Failed to correctly initialize SwapParams")
|
||||
}
|
||||
|
||||
if one.SyncParams.RequestDbPath == one.Path {
|
||||
t.Fatal("Failed to correctly initialize SyncParams")
|
||||
}
|
||||
|
||||
if one.HiveParams.KadDbPath == one.Path {
|
||||
t.Fatal("Failed to correctly initialize HiveParams")
|
||||
}
|
||||
|
||||
if one.StoreParams.ChunkDbPath == one.Path {
|
||||
if one.ChunkDbPath == one.Path {
|
||||
t.Fatal("Failed to correctly initialize StoreParams")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user