π§ - Please note this is still under active development and does not currently work e2e! Busy building some others and will come back to it. In the mean time visit π https://docs.pact.io/plugins for some working templates π
2022/11/29 16:16:39 Received InitPlugin request: plugin-driver-rust 0.1.16 2022/11/29 16:16:39 Received UpdateCatalogue request: [type:MATCHER key:"v3-includes" type:MATCHER key:"v3-decimal-type" type:CONTENT_GENERATOR key:"binary" values:{key:"content-types" value:"application/octet-stream"} type:MATCHER key:"v4-max-equals-ignore-order" type:TRANSPORT key:"https" type:TRANSPORT key:"http" type:MATCHER key:"v3-time" type:MATCHER key:"v3-null" type:MATCHER key:"v1-equality" type:MATCHER key:"v4-array-contains" key:"json" values:{key:"content-types" value:"application/.*json,application/json-rpc,application/jsonrequest"} key:"matt" values:{key:"content-types" value:"text/matt;application/matt"} key:"text" values:{key:"content-types" value:"text/plain"} key:"xml" values:{key:"content-types" value:"application/.*xml,text/xml"} type:MATCHER key:"v3-content-type" type:MATCHER key:"v4-not-empty" type:CONTENT_GENERATOR key:"json" values:{key:"content-types" value:"application/.*json,application/json-rpc,application/jsonrequest"} type:MATCHER key:"v3-integer-type" type:MATCHER key:"v2-minmax-type" type:TRANSPORT key:"matt" type:MATCHER key:"v4-semver" type:MATCHER key:"v2-type" type:MATCHER key:"v2-max-type" key:"multipart-form-data" values:{key:"content-types" value:"multipart/form-data,multipart/mixed"} type:MATCHER key:"v4-equals-ignore-order" type:MATCHER key:"v3-datetime" type:MATCHER key:"v2-min-type" type:MATCHER key:"v4-min-equals-ignore-order" type:MATCHER key:"v2-regex" type:MATCHER key:"v3-number-type" type:MATCHER key:"v4-minmax-equals-ignore-order" type:MATCHER key:"v3-date"] 2022/11/29 16:16:40 Received ConfigureInteraction request: application/matt fields:{key:"request" value:{struct_value:{fields:{key:"body" value:{string_value:"hellotcp"}}}}} fields:{key:"response" value:{struct_value:{fields:{key:"body" value:{string_value:"tcpworld"}}}}} 2022/11/29 16:16:40 Parsed ContentsConfig: hellotcp tcpworld 2022/11/29 16:16:40 Received StartMockServer request: hostInterface:"127.0.0.1" pact:"{"consumer":{"name":"myconsumer"},"interactions":[{"description":"a MATT message","key":"daf974126abe44c0","pending":false,"request":{"contents":{"content":"MATThellotcpMATT","contentType":"application/matt","contentTypeHint":"DEFAULT","encoded":false}},"response":[{"contents":{"content":"MATTtcpworldMATT","contentType":"application/matt","contentTypeHint":"DEFAULT","encoded":false}}],"transport":"matt","type":"Synchronous/Messages"}],"metadata":{"pact-js":{"version":"10.3.0"},"pactRust":{"ffi":"0.3.15","models":"1.0.1"},"pactSpecification":{"version":"4.0"},"plugins":[{"configuration":{},"name":"matt","version":"0.0.4"}]},"provider":{"name":"myprovider"}}" 2022/11/29 16:16:40 Starting TCP server 328573a1-b1d5-4468-a94c-4161304f1b66 on port 56280 2022/11/29 16:16:40 TCP server started 328573a1-b1d5-4468-a94c-4161304f1b66 on port 56280 2022/11/29 16:16:40 Received GetMockServerResults request: serverKey:"328573a1-b1d5-4468-a94c-4161304f1b66" 2022/11/29 16:16:40 Received GetMockServerResults request: serverKey:"328573a1-b1d5-4468-a94c-4161304f1b66" 2022/11/29 16:16:40 Received ShutdownMockServer request: serverKey:"328573a1-b1d5-4468-a94c-4161304f1b66"
2022/11/29 16:16:44 starting server on port 56291 2022/11/29 16:16:44 Received InitPlugin request: plugin-driver-rust 0.1.16 2022/11/29 16:16:44 Received UpdateCatalogue request: [type:MATCHER key:"v3-time" type:MATCHER key:"v4-max-equals-ignore-order" type:MATCHER key:"v2-min-type" type:MATCHER key:"v3-null" type:MATCHER key:"v2-max-type" type:CONTENT_GENERATOR key:"json" values:{key:"content-types" value:"application/.*json,application/json-rpc,application/jsonrequest"} type:MATCHER key:"v1-equality" type:TRANSPORT key:"matt" key:"xml" values:{key:"content-types" value:"application/.*xml,text/xml"} type:MATCHER key:"v3-datetime" key:"multipart-form-data" values:{key:"content-types" value:"multipart/form-data,multipart/mixed"} type:MATCHER key:"v2-regex" type:MATCHER key:"v3-decimal-type" type:MATCHER key:"v2-minmax-type" type:MATCHER key:"v4-min-equals-ignore-order" key:"text" values:{key:"content-types" value:"text/plain"} key:"json" values:{key:"content-types" value:"application/.*json,application/json-rpc,application/jsonrequest"} type:CONTENT_GENERATOR key:"binary" values:{key:"content-types" value:"application/octet-stream"} type:MATCHER key:"v4-not-empty" key:"matt" values:{key:"content-types" value:"text/matt;application/matt"} type:MATCHER key:"v3-date" type:MATCHER key:"v3-integer-type" type:MATCHER key:"v4-array-contains" type:MATCHER key:"v3-includes" type:MATCHER key:"v3-number-type" type:MATCHER key:"v4-minmax-equals-ignore-order" type:MATCHER key:"v3-content-type" type:MATCHER key:"v4-equals-ignore-order" type:MATCHER key:"v4-semver" type:MATCHER key:"v2-type"] 2022/11/29 16:16:44 Received PrepareInteractionForVerification request: pact:"{"consumer":{"name":"myconsumer"},"interactions":[{"description":"a MATT message","key":"daf974126abe44c0","pending":false,"request":{"contents":{"content":"MATThellotcpMATT","contentType":"application/matt","contentTypeHint":"DEFAULT","encoded":false}},"response":[{"contents":{"content":"MATTtcpworldMATT","contentType":"application/matt","contentTypeHint":"DEFAULT","encoded":false}}],"transport":"matt","type":"Synchronous/Messages"},{"description":"an HTTP request to /matt","key":"b6c5b973534175ec","pending":false,"providerStates":[{"name":"the Matt protocol exists"}],"request":{"body":{"content":"MATThelloMATT","contentType":"application/matt","contentTypeHint":"DEFAULT","encoded":false},"headers":{"content-type":["application/matt"]},"method":"POST","path":"/matt"},"response":{"body":{"content":"MATTworldMATT","contentType":"application/matt","contentTypeHint":"DEFAULT","encoded":false},"headers":{"content-type":["application/matt"]},"status":200},"type":"Synchronous/HTTP"}],"metadata":{"pact-js":{"version":"10.3.0"},"pactRust":{"ffi":"0.3.15","mockserver":"0.9.6","models":"1.0.1"},"pactSpecification":{"version":"4.0"},"plugins":[{"configuration":{},"name":"matt","version":"0.0.4"}]},"provider":{"name":"myprovider"}}" interactionKey:"daf974126abe44c0" config:{fields:{key:"host" value:{string_value:"127.0.0.1"}} fields:{key:"port" value:{number_value:8887}}} 2022/11/29 16:16:44 Received VerifyInteraction request: interactionData:{body:{contentType:"application/matt" content:{value:"MATThellotcpMATT"}}} config:{fields:{key:"host" value:{string_value:"127.0.0.1"}} fields:{key:"port" value:{number_value:8887}}} pact:"{"consumer":{"name":"myconsumer"},"interactions":[{"description":"a MATT message","key":"daf974126abe44c0","pending":false,"request":{"contents":{"content":"MATThellotcpMATT","contentType":"application/matt","contentTypeHint":"DEFAULT","encoded":false}},"response":[{"contents":{"content":"MATTtcpworldMATT","contentType":"application/matt","contentTypeHint":"DEFAULT","encoded":false}}],"transport":"matt","type":"Synchronous/Messages"},{"description":"an HTTP request to /matt","key":"b6c5b973534175ec","pending":false,"providerStates":[{"name":"the Matt protocol exists"}],"request":{"body":{"content":"MATThelloMATT","contentType":"application/matt","contentTypeHint":"DEFAULT","encoded":false},"headers":{"content-type":["application/matt"]},"method":"POST","path":"/matt"},"response":{"body":{"content":"MATTworldMATT","contentType":"application/matt","contentTypeHint":"DEFAULT","encoded":false},"headers":{"content-type":["application/matt"]},"status":200},"type":"Synchronous/HTTP"}],"metadata":{"pact-js":{"version":"10.3.0"},"pactRust":{"ffi":"0.3.15","mockserver":"0.9.6","models":"1.0.1"},"pactSpecification":{"version":"4.0"},"plugins":[{"configuration":{},"name":"matt","version":"0.0.4"}]},"provider":{"name":"myprovider"}}" interactionKey:"daf974126abe44c0" 2022/11/29 16:16:44 Received CompareContents request: expected:{contentType:"application/matt" content:{value:"MATTworldMATT"}} actual:{contentType:"application/matt;charset=utf-8" content:{value:"MATTworldMATT"}} allow_unexpected_keys:true pluginConfiguration:{interactionConfiguration:{} pactConfiguration:{}}