gripmock icon indicating copy to clipboard operation
gripmock copied to clipboard

google.protobuf.Timestamp type conversion in stub

Open kunlk opened this issue 2 years ago • 0 comments

Hello, I have a query about the google.protobuf.Timestamp type conversion. My scenarios as below:

  • I have a google.protobuf.Timestamp type called expire_time which defined in proto file google.protobuf.Timestamp expire_time = 2;

  • I defined stub file like below "input": { "equals": { "expire_time": "2022-06-21T16:38:39.607823Z" } }, "output": { "data": { "expire_time": "2022-06-21T16:38:39.607823Z" } }

  • However, when running the test I got the error Can't find stub error Can't find stub { expire_time: map[nanos:6.07823e+08 seconds:1.655829519e+09] }

I know the timestamp data format is changed, so in this case how could I define the input value in the stub file ?

kunlk avatar Jul 29 '22 03:07 kunlk