aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/config_test.go
diff options
context:
space:
mode:
authorViktor TrĂ³n <viktor.tron@gmail.com>2018-06-22 05:00:43 +0800
committerGitHub <noreply@github.com>2018-06-22 05:00:43 +0800
commiteaff89291ce998ba4bf9b9816ca8a15c8b85f440 (patch)
treec77d7a06627a1a7f578d0fec8e39788e66672e53 /swarm/api/config_test.go
parentd926bf2c7e3182d694c15829a37a0ca7331cd03c (diff)
parente187711c6545487d4cac3701f0f506bb536234e2 (diff)
downloaddexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar
dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.gz
dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.bz2
dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.lz
dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.xz
dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.tar.zst
dexon-eaff89291ce998ba4bf9b9816ca8a15c8b85f440.zip
Merge pull request #17041 from ethersphere/swarm-network-rewrite-merge
Swarm POC3 - happy solstice
Diffstat (limited to 'swarm/api/config_test.go')
-rw-r--r--swarm/api/config_test.go20
1 files changed, 5 insertions, 15 deletions
diff --git a/swarm/api/config_test.go b/swarm/api/config_test.go
index 5636b6daf..bd7e1d870 100644
--- a/swarm/api/config_test.go
+++ b/swarm/api/config_test.go
@@ -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")
}
}