remove free disk check since it's unreliable (#1516)

This commit is contained in:
Egon Elbre 2019-03-18 22:18:44 +02:00 committed by Alexander Leitner
parent 56251570ef
commit 7961bcbc92

View File

@ -27,7 +27,6 @@ func TestMonitor(t *testing.T) {
planet.Start(ctx) planet.Start(ctx)
var freeBandwidth int64 var freeBandwidth int64
var freeSpace int64
for _, storageNode := range planet.StorageNodes { for _, storageNode := range planet.StorageNodes {
storageNode.Storage2.Monitor.Loop.Pause() storageNode.Storage2.Monitor.Loop.Pause()
@ -36,7 +35,6 @@ func TestMonitor(t *testing.T) {
// assume that all storage nodes have the same initial values // assume that all storage nodes have the same initial values
freeBandwidth = info.Capacity.FreeBandwidth freeBandwidth = info.Capacity.FreeBandwidth
freeSpace = info.Capacity.FreeDisk
} }
expectedData := make([]byte, 100*memory.KiB) expectedData := make([]byte, 100*memory.KiB)
@ -56,7 +54,6 @@ func TestMonitor(t *testing.T) {
stats, err := storageNode.Storage2.Inspector.Stats(ctx, &pb.StatsRequest{}) stats, err := storageNode.Storage2.Inspector.Stats(ctx, &pb.StatsRequest{})
require.NoError(t, err) require.NoError(t, err)
if stats.UsedSpace > 0 { if stats.UsedSpace > 0 {
assert.Equal(t, freeSpace-stats.UsedSpace, info.Capacity.FreeDisk)
assert.Equal(t, freeBandwidth-stats.UsedBandwidth, info.Capacity.FreeBandwidth) assert.Equal(t, freeBandwidth-stats.UsedBandwidth, info.Capacity.FreeBandwidth)
nodeAssertions++ nodeAssertions++
} }