diff options
author | Attila Gazso <attila.gazso@prezi.com> | 2018-10-18 01:22:37 +0800 |
---|---|---|
committer | Viktor TrĂ³n <viktor.tron@gmail.com> | 2018-10-18 01:22:37 +0800 |
commit | cdf5982cfca2cd7d5fea85c226af5e48fde837df (patch) | |
tree | adcd4a5b24d285ca72174c085bd17a898b628721 /swarm/network/stream/delivery_test.go | |
parent | 4e693ad5a6f118dcf4f3586938c17fc8ef5822b5 (diff) | |
download | dexon-cdf5982cfca2cd7d5fea85c226af5e48fde837df.tar dexon-cdf5982cfca2cd7d5fea85c226af5e48fde837df.tar.gz dexon-cdf5982cfca2cd7d5fea85c226af5e48fde837df.tar.bz2 dexon-cdf5982cfca2cd7d5fea85c226af5e48fde837df.tar.lz dexon-cdf5982cfca2cd7d5fea85c226af5e48fde837df.tar.xz dexon-cdf5982cfca2cd7d5fea85c226af5e48fde837df.tar.zst dexon-cdf5982cfca2cd7d5fea85c226af5e48fde837df.zip |
swarm: Lightnode mode: disable sync, retrieve, subscription (#17899)
* swarm: Lightnode mode: disable sync, retrieve, subscription
* swarm/network/stream: assign error and check in one line
* swarm: restructured RegistryOption initializing
* swarm: empty commit to retrigger CI build
* swarm/network/stream: Added comments explaining RegistryOptions
Diffstat (limited to 'swarm/network/stream/delivery_test.go')
-rw-r--r-- | swarm/network/stream/delivery_test.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/swarm/network/stream/delivery_test.go b/swarm/network/stream/delivery_test.go index c6ebae3f0..ec6148a0b 100644 --- a/swarm/network/stream/delivery_test.go +++ b/swarm/network/stream/delivery_test.go @@ -75,7 +75,9 @@ func TestStreamerRetrieveRequest(t *testing.T) { } func TestStreamerUpstreamRetrieveRequestMsgExchangeWithoutStore(t *testing.T) { - tester, streamer, _, teardown, err := newStreamerTester(t, nil) + tester, streamer, _, teardown, err := newStreamerTester(t, &RegistryOptions{ + DoServeRetrieve: true, + }) defer teardown() if err != nil { t.Fatal(err) @@ -127,7 +129,9 @@ func TestStreamerUpstreamRetrieveRequestMsgExchangeWithoutStore(t *testing.T) { // upstream request server receives a retrieve Request and responds with // offered hashes or delivery if skipHash is set to true func TestStreamerUpstreamRetrieveRequestMsgExchange(t *testing.T) { - tester, streamer, localStore, teardown, err := newStreamerTester(t, nil) + tester, streamer, localStore, teardown, err := newStreamerTester(t, &RegistryOptions{ + DoServeRetrieve: true, + }) defer teardown() if err != nil { t.Fatal(err) @@ -221,7 +225,9 @@ func TestStreamerUpstreamRetrieveRequestMsgExchange(t *testing.T) { } func TestStreamerDownstreamChunkDeliveryMsgExchange(t *testing.T) { - tester, streamer, localStore, teardown, err := newStreamerTester(t, nil) + tester, streamer, localStore, teardown, err := newStreamerTester(t, &RegistryOptions{ + DoServeRetrieve: true, + }) defer teardown() if err != nil { t.Fatal(err) @@ -336,7 +342,8 @@ func testDeliveryFromNodes(t *testing.T, nodes, conns, chunkCount int, skipCheck netStore.NewNetFetcherFunc = network.NewFetcherFactory(delivery.RequestFromPeers, true).New r := NewRegistry(addr.ID(), delivery, netStore, state.NewInmemoryStore(), &RegistryOptions{ - SkipCheck: skipCheck, + SkipCheck: skipCheck, + DoServeRetrieve: true, }) bucket.Store(bucketKeyRegistry, r) |