diff options
author | Javier Peletier <jm@epiclabs.io> | 2018-10-02 15:36:11 +0800 |
---|---|---|
committer | Javier Peletier <jm@epiclabs.io> | 2018-10-03 15:12:06 +0800 |
commit | 696bc9b01ce0ed3347fa1bd64460ccc08091e90a (patch) | |
tree | e2c9a4ae0689443b27679831904947a39fb8f20b /swarm | |
parent | 58c0879c2fbc9f88f35ba503674088da23a8a5a7 (diff) | |
download | go-tangerine-696bc9b01ce0ed3347fa1bd64460ccc08091e90a.tar.gz go-tangerine-696bc9b01ce0ed3347fa1bd64460ccc08091e90a.tar.zst go-tangerine-696bc9b01ce0ed3347fa1bd64460ccc08091e90a.zip |
swarm/storage/feeds: renamed vars that can conflict with package name
Diffstat (limited to 'swarm')
-rw-r--r-- | swarm/api/client/client_test.go | 4 | ||||
-rw-r--r-- | swarm/storage/feeds/handler_test.go | 22 | ||||
-rw-r--r-- | swarm/storage/feeds/request_test.go | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/swarm/api/client/client_test.go b/swarm/api/client/client_test.go index 4fad7fbc7..2aecdb299 100644 --- a/swarm/api/client/client_test.go +++ b/swarm/api/client/client_test.go @@ -508,12 +508,12 @@ func TestClientCreateUpdateFeed(t *testing.T) { // now try retrieving feed updates without a manifest - feed := &feeds.Feed{ + fd := &feeds.Feed{ Topic: topic, User: signer.Address(), } - lookupParams := feeds.NewQueryLatest(feed, lookup.NoClue) + lookupParams := feeds.NewQueryLatest(fd, lookup.NoClue) reader, err = client.QueryFeed(lookupParams, "") if err != nil { t.Fatalf("Error retrieving feed updates: %s", err) diff --git a/swarm/storage/feeds/handler_test.go b/swarm/storage/feeds/handler_test.go index 967bc6d4b..b35a7c1c1 100644 --- a/swarm/storage/feeds/handler_test.go +++ b/swarm/storage/feeds/handler_test.go @@ -94,7 +94,7 @@ func TestFeedsHandler(t *testing.T) { defer cancel() topic, _ := NewTopic("Mess with Swarm feeds code and see what ghost catches you", nil) - feed := Feed{ + fd := Feed{ Topic: topic, User: signer.Address(), } @@ -107,7 +107,7 @@ func TestFeedsHandler(t *testing.T) { "clyde", // t=4285 } - request := NewFirstRequest(feed.Topic) // this timestamps the update at t = 4200 (start time) + request := NewFirstRequest(fd.Topic) // this timestamps the update at t = 4200 (start time) chunkAddress := make(map[string]storage.Address) data := []byte(updates[0]) request.SetData(data) @@ -270,7 +270,7 @@ func TestSparseUpdates(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() topic, _ := NewTopic("Very slow updates", nil) - feed := Feed{ + fd := Feed{ Topic: topic, User: signer.Address(), } @@ -280,7 +280,7 @@ func TestSparseUpdates(t *testing.T) { var epoch lookup.Epoch var lastUpdateTime uint64 for T := uint64(0); T < today; T += 5 * Year { - request := NewFirstRequest(feed.Topic) + request := NewFirstRequest(fd.Topic) request.Epoch = lookup.GetNextEpoch(epoch, T) request.data = generateData(T) // this generates some data that depends on T, so we can check later request.Sign(signer) @@ -295,14 +295,14 @@ func TestSparseUpdates(t *testing.T) { lastUpdateTime = T } - query := NewQuery(&feed, today, lookup.NoClue) + query := NewQuery(&fd, today, lookup.NoClue) _, err = rh.Lookup(ctx, query) if err != nil { t.Fatal(err) } - _, content, err := rh.GetContent(&feed) + _, content, err := rh.GetContent(&fd) if err != nil { t.Fatal(err) } @@ -321,7 +321,7 @@ func TestSparseUpdates(t *testing.T) { t.Fatal(err) } - _, content, err = rh.GetContent(&feed) + _, content, err = rh.GetContent(&fd) if err != nil { t.Fatal(err) } @@ -350,11 +350,11 @@ func TestValidator(t *testing.T) { // create new feed topic, _ := NewTopic(subtopicName, nil) - feed := Feed{ + fd := Feed{ Topic: topic, User: signer.Address(), } - mr := NewFirstRequest(feed.Topic) + mr := NewFirstRequest(fd.Topic) // chunk with address data := []byte("foo") @@ -420,7 +420,7 @@ func TestValidatorInStore(t *testing.T) { badChunk := storage.NewChunk(chunks[1].Address(), goodChunk.Data()) topic, _ := NewTopic("xyzzy", nil) - feed := Feed{ + fd := Feed{ Topic: topic, User: signer.Address(), } @@ -430,7 +430,7 @@ func TestValidatorInStore(t *testing.T) { Epoch: lookup.Epoch{Time: 42, Level: 1, }, - Feed: feed, + Feed: fd, } updateAddr := id.Addr() diff --git a/swarm/storage/feeds/request_test.go b/swarm/storage/feeds/request_test.go index a9a4d1505..8a15815a4 100644 --- a/swarm/storage/feeds/request_test.go +++ b/swarm/storage/feeds/request_test.go @@ -256,7 +256,7 @@ func TestReverse(t *testing.T) { defer teardownTest() topic, _ := NewTopic("Cervantes quotes", nil) - feed := Feed{ + fd := Feed{ Topic: topic, User: signer.Address(), } @@ -264,7 +264,7 @@ func TestReverse(t *testing.T) { data := []byte("Donde una puerta se cierra, otra se abre") request := new(Request) - request.Feed = feed + request.Feed = fd request.Epoch = epoch request.data = data |