Ensure discovery tests run against postgres (#1230)

This commit is contained in:
Egon Elbre 2019-02-05 19:03:16 +02:00 committed by GitHub
parent 3c73d3a33c
commit b16f27c54b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,23 +14,17 @@ import (
) )
func TestCache_Refresh(t *testing.T) { func TestCache_Refresh(t *testing.T) {
ctx := testcontext.New(t) testplanet.Run(t, testplanet.Config{
defer ctx.Cleanup() SatelliteCount: 1, StorageNodeCount: 10, UplinkCount: 0,
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
time.Sleep(5 * time.Second)
planet, err := testplanet.New(t, 1, 10, 0) satellite := planet.Satellites[0]
if err != nil { for _, storageNode := range planet.StorageNodes {
t.Fatal(err) node, err := satellite.Overlay.Service.Get(ctx, storageNode.ID())
} if assert.NoError(t, err) {
defer ctx.Check(planet.Shutdown) assert.Equal(t, storageNode.Addr(), node.Address.Address)
}
planet.Start(ctx)
time.Sleep(5 * time.Second)
satellite := planet.Satellites[0]
for _, storageNode := range planet.StorageNodes {
node, err := satellite.Overlay.Service.Get(ctx, storageNode.ID())
if assert.NoError(t, err) {
assert.Equal(t, storageNode.Addr(), node.Address.Address)
} }
} })
} }