mirror of
https://github.com/weaveworks/scope.git
synced 2026-05-21 08:33:05 +00:00
fixup: remove timestamp argument from node.WithLatest()
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"github.com/weaveworks/common/mtime"
|
||||
"github.com/weaveworks/scope/report"
|
||||
)
|
||||
|
||||
@@ -189,7 +188,7 @@ func ColorConnected(r Renderer) Renderer {
|
||||
RenderFunc: func(input Nodes) Nodes {
|
||||
output := input.Copy()
|
||||
for id := range connected(input.Nodes) {
|
||||
output[id] = output[id].WithLatest(IsConnectedMark, mtime.Now(), "true")
|
||||
output[id] = output[id].WithLatest(IsConnectedMark, "true")
|
||||
}
|
||||
return Nodes{Nodes: output, Filtered: input.Filtered}
|
||||
},
|
||||
|
||||
@@ -3,7 +3,6 @@ package render_test
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/weaveworks/common/test"
|
||||
"github.com/weaveworks/scope/render"
|
||||
@@ -12,7 +11,6 @@ import (
|
||||
)
|
||||
|
||||
func TestPropagateSingleMetrics(t *testing.T) {
|
||||
now := time.Now()
|
||||
for _, c := range []struct {
|
||||
name string
|
||||
input report.Node
|
||||
@@ -131,7 +129,7 @@ func TestPropagateSingleMetrics(t *testing.T) {
|
||||
"metric1": report.MakeMetric(nil),
|
||||
}),
|
||||
report.MakeNode("child2").
|
||||
WithLatest(report.DoesNotMakeConnections, now, "").
|
||||
WithLatest(report.DoesNotMakeConnections, "").
|
||||
WithTopology(report.Container).
|
||||
WithMetrics(report.Metrics{
|
||||
"metric2": report.MakeMetric(nil),
|
||||
@@ -150,7 +148,7 @@ func TestPropagateSingleMetrics(t *testing.T) {
|
||||
"metric1": report.MakeMetric(nil),
|
||||
}),
|
||||
report.MakeNode("child2").
|
||||
WithLatest(report.DoesNotMakeConnections, now, "").
|
||||
WithLatest(report.DoesNotMakeConnections, "").
|
||||
WithTopology(report.Container).
|
||||
WithMetrics(report.Metrics{
|
||||
"metric2": report.MakeMetric(nil),
|
||||
|
||||
@@ -5,8 +5,6 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/weaveworks/common/mtime"
|
||||
|
||||
"github.com/weaveworks/scope/render"
|
||||
"github.com/weaveworks/scope/report"
|
||||
"github.com/weaveworks/scope/test/utils"
|
||||
@@ -91,7 +89,7 @@ var (
|
||||
WithSets(report.MakeSets().
|
||||
Add(report.DockerContainerIPs, report.MakeStringSet(pauseContainerIP)).
|
||||
Add(report.DockerContainerIPsWithScopes, report.MakeStringSet(report.MakeAddressNodeID("", pauseContainerIP))),
|
||||
).WithTopology(report.Container).WithLatest(report.DoesNotMakeConnections, mtime.Now(), ""),
|
||||
).WithTopology(report.Container).WithLatest(report.DoesNotMakeConnections, ""),
|
||||
},
|
||||
},
|
||||
Host: report.Topology{
|
||||
|
||||
Reference in New Issue
Block a user