Robert Henzel
08/10/2022, 8:22 PMgoogle.protobuf.Timestamp
struct in grpcInteraction, which is
/ In JSON format, the Timestamp type is encoded as a string in the
// [RFC 3339](<https://www.ietf.org/rfc/rfc3339.txt>) format. That is, the
// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
// where {year} is always expressed using four digits while {month}, {day},
// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
// is required. A proto3 JSON serializer should always use UTC (as indicated by
// "Z") when printing the Timestamp type and a proto3 JSON parser should be
// able to accept both UTC and other timezones (as indicated by an offset).
//
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
// 01:30 UTC on January 15, 2017.
//
// In JavaScript, one can convert a Date object to this format using the
// standard
// [toISOString()](<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>)
// method. In Python, a standard `datetime.datetime` object can be converted
// to this format using
// [`strftime`](<https://docs.python.org/2/library/time.html#time.strftime>) with
// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
// the Joda Time's [`ISODateTimeFormat.dateTime()`](
// <http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D>
// ) to obtain a formatter capable of generating timestamps in this format.
//
//
message Timestamp {
// Represents seconds of UTC time since Unix epoch
// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
// 9999-12-31T23:59:59Z inclusive.
int64 seconds = 1;
// Non-negative fractions of a second at nanosecond resolution. Negative
// second values with fractions must still have non-negative nanos values
// that count forward in time. Must be from 0 to 999,999,999
// inclusive.
int32 nanos = 2;
}
This approach does not work
grpcInteraction := `{
"pact:proto": "` + path1 + `",
"pact:proto-service": "Service/Method",
"pact:content-type": "application/protobuf",
"request": {
"id": "matching(type, '00000000-0000-0000-0000-000000000001')"
},
"response": {
"id": "matching(type, '00000000-0000-0000-0000-000000000001')",
"card_manufacture_last_send" : {
"seconds":"matching(number, 1)",
"nanos":"matching(number, 1)"
}
}
}`
This too, does not work
grpcInteraction := `{
"pact:proto": "` + path1 + `",
"pact:proto-service": "Service/Method",
"pact:content-type": "application/protobuf",
"request": {
"id": "matching(type, '00000000-0000-0000-0000-000000000001')"
},
"response": {
"id": "matching(type, '00000000-0000-0000-0000-000000000001')",
"card_manufacture_last_send": "matching(type,'2022-08-10T20:25:04.835478326Z')"
}
}`
The rest of nested fields work.Robert Henzel
08/10/2022, 9:10 PMmessage GetCardConfigManufacturerResponse {
string id = 1;
google.protobuf.Timestamp card_manufacture_last_send = 2;
}
uglyog
Robert Henzel
08/11/2022, 7:54 AMRobert Henzel
08/11/2022, 7:54 AMRobert Henzel
08/11/2022, 7:56 AMRobert Henzel
08/11/2022, 7:57 AMuglyog
Robert Henzel
08/11/2022, 8:02 AMRobert Henzel
08/11/2022, 8:04 AMRobert Henzel
08/11/2022, 8:04 AMRobert Henzel
08/11/2022, 8:08 AMuglyog
uglyog
uglyog
Robert Henzel
08/11/2022, 8:13 AMRobert Henzel
08/11/2022, 8:14 AMRobert Henzel
08/11/2022, 8:14 AMuglyog
uglyog
uglyog
Robert Henzel
08/11/2022, 8:15 AMRobert Henzel
08/11/2022, 8:16 AMuglyog
Robert Henzel
08/11/2022, 8:19 AMMatt (pactflow.io / pact-js / pact-go)
uglyog
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Robert Henzel
08/11/2022, 8:41 AMRobert Henzel
08/11/2022, 8:42 AMRobert Henzel
08/12/2022, 8:43 AMMatt (pactflow.io / pact-js / pact-go)
Robert Henzel
08/22/2022, 4:09 PMLOG_LEVEL=debug go test ./...
It does show the debugging informaton. I wonder if there can be some conflict between logrus
and hashicorp/logutils
and this variable LOG_LEVEL
sets it for both of them.Matt (pactflow.io / pact-js / pact-go)
LOG_LEVEL
is a pretty standard environment variable. Are you suggesting we default to a different one for Pact to avoid conflict with logrus?