Skip to content

Commit

Permalink
Properly initialize nested struct in influxdb test
Browse files Browse the repository at this point in the history
If actually running the influxdb tests (not included in Makefile), a
compiler error occured ("cannot use promoted field in struct literal of
type") because direct access to promoted fields is only allowed in
assignments, not when initializing structs (at least, unless
golang/go#9859 gets implemented).

Signed-off-by: Jens Erat <jens.erat@daimler.com>
  • Loading branch information
JensErat committed Dec 16, 2020
1 parent ac63c56 commit a033a68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/internal/storage/influxdb/influxdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ func createTestStats() (*info.ContainerInfo, *info.ContainerStats) {
"2GB": {Usage: 9876, MaxUsage: 5432, Failcnt: 1},
},
ReferencedMemory: 12345,
PerfStats: []info.PerfStat{{Cpu: 1, Name: "cycles", ScalingRatio: 1.5, Value: 4589}},
PerfStats: []info.PerfStat{{Cpu: 1, PerfValue: info.PerfValue{Name: "cycles", ScalingRatio: 1.5, Value: 4589}}},
Resctrl: info.ResctrlStats{
MemoryBandwidth: []info.MemoryBandwidthStats{
{TotalBytes: 11234, LocalBytes: 4567},
Expand Down

0 comments on commit a033a68

Please sign in to comment.