Move timestamp up from 'Latest' string map to Report level

We never merge multiple string values in a single node from different
sources, so it's sufficient to take the value from the latest report.
This commit is contained in:
Bryan Boreham
2019-10-16 07:52:45 +00:00
parent e4660b081e
commit 07287c6ac0
15 changed files with 138 additions and 217 deletions

View File

@@ -17,6 +17,7 @@ import (
"github.com/paypal/ionet"
"github.com/ugorji/go/codec"
"github.com/weaveworks/common/mtime"
fs_hook "github.com/weaveworks/common/fs"
"github.com/weaveworks/common/test"
@@ -695,6 +696,7 @@ func pluginSpec(ID string, interfaces ...string) xfer.PluginSpec {
func testReport(topology report.Topology, spec xfer.PluginSpec) report.Report {
rpt := report.MakeReport()
rpt.TS = mtime.Now()
set := false
f := func(t *report.Topology) {
if t.Label != topology.Label {