9bdee7b106
* WIP possible discovery service impl * Adds discovery service to CaptPlanet * Updates the config and server for discovery service * updates testplanet to use discovery package * update satellite imports * Removes unnecessary cache test * linter fixes * adds discovery startup to captplanet * invoke refresh * updates to discovery refresh cycle * Make implementation more consistent with previous implementation * add wait before trying to upload * sleep a bit more * remove kademlia bootstrap * updates * remove comments
30 lines
543 B
Go
30 lines
543 B
Go
// Copyright (C) 2018 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package discovery_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"storj.io/storj/internal/testcontext"
|
|
"storj.io/storj/internal/testplanet"
|
|
)
|
|
|
|
func TestCache_Refresh(t *testing.T) {
|
|
ctx := testcontext.New(t)
|
|
defer ctx.Cleanup()
|
|
|
|
planet, err := testplanet.New(t, 1, 30, 0)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
defer ctx.Check(planet.Shutdown)
|
|
|
|
planet.Start(ctx)
|
|
|
|
err = planet.Satellites[0].Discovery.Refresh(ctx)
|
|
assert.NoError(t, err)
|
|
}
|