I am testing type matcher with requestMetadata but...
# protobufs
s
I am testing type matcher with requestMetadata but it seems to expect exact value instead of matching type.
Copy code
{
  "pact:proto": "/home/service.proto",
  "pact:proto-service": "Service/Validate",
  "pact:content-type": "application/protobuf",
  "request": {
    "token": "matching(type, 'bj8qnqw9cnalksnd9qwnk1j9cjm')"
  },
  "requestMetadata": {
    "x-b3-traceid": "matching(type, 'foo')"
  },
  "response": {
    "valid": "matching(boolean, true)"
  }
}
Copy code
pact validation failed: [{Request:{Method: Path:Service/Validate Query: Headers:map[] Body:<nil>} Mismatches:[{Actual:0123456789abcdef0123456789abcdef Expected:foo Key: Mismatch:Comparison of metadata key 'x-b3-traceid' failed: Expected 'foo' to be equal to '0123456789abcdef0123456789abcdef' Type:}] Type:}]
r
That might be a bug. Which language are you using?
s
Golang
r
Can you raise an issue for that?
s
Sure raise it under pact-go or pact-plugin ?
r
Let's start with pact-go
s
cool sounds good