Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: common/tsmon/field/field_test.go

Issue 1857643003: Revert of Migrate tsmon protos to proto3 (Closed) Base URL: git@github.com:luci/luci-go.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/tsmon/field/field.go ('k') | common/tsmon/flush_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/tsmon/field/field_test.go
diff --git a/common/tsmon/field/field_test.go b/common/tsmon/field/field_test.go
index 53b7f384fb028dc570b1273a089109fb76f98f2e..88a925245603fbf0b65ca6ceeadcf6f5b7ac5734 100644
--- a/common/tsmon/field/field_test.go
+++ b/common/tsmon/field/field_test.go
@@ -6,6 +6,8 @@
import (
"fmt"
"testing"
+
+ "github.com/golang/protobuf/proto"
pb "github.com/luci/luci-go/common/tsmon/ts_mon_proto"
@@ -23,9 +25,9 @@
values: makeInterfaceSlice("v"),
want: []*pb.MetricsField{
{
- Name: "foo",
- Type: pb.MetricsField_STRING,
- StringValue: "v",
+ Name: proto.String("foo"),
+ Type: pb.MetricsField_STRING.Enum(),
+ StringValue: proto.String("v"),
},
},
},
@@ -34,9 +36,9 @@
values: makeInterfaceSlice(int64(123)),
want: []*pb.MetricsField{
{
- Name: "foo",
- Type: pb.MetricsField_INT,
- IntValue: 123,
+ Name: proto.String("foo"),
+ Type: pb.MetricsField_INT.Enum(),
+ IntValue: proto.Int64(123),
},
},
},
@@ -45,9 +47,9 @@
values: makeInterfaceSlice(true),
want: []*pb.MetricsField{
{
- Name: "foo",
- Type: pb.MetricsField_BOOL,
- BoolValue: true,
+ Name: proto.String("foo"),
+ Type: pb.MetricsField_BOOL.Enum(),
+ BoolValue: proto.Bool(true),
},
},
},
« no previous file with comments | « common/tsmon/field/field.go ('k') | common/tsmon/flush_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698