```? /tmp git clone
https://github.com/nsfrias/pact-go-issue-repro-20220607.git
Cloning into 'pact-go-issue-repro-20220607'...
remote: Enumerating objects: 63, done.
remote: Counting objects: 100% (63/63), done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 63 (delta 22), reused 48 (delta 11), pack-reused 0
Receiving objects: 100% (63/63), 26.85 KiB | 8.95 MiB/s, done.
Resolving deltas: 100% (22/22), done.
? /tmp cd pact-go-issue-repro-20220607
? pact-go-issue-repro-20220607 git:(main) go install
http://github.com/pact-foundation/pact-go/v2@2.x.x
go: downloading
http://github.com/pact-foundation/pact-go/v2 v2.0.0-beta.11.0.20220607035712-b017cad30d3d
? pact-go-issue-repro-20220607 git:(main) pact-go -l DEBUG install
2022/06/09 15:54:22 [INFO] package libpact_ffi found
2022/06/09 15:54:22 [INFO] checking version 0.3.2 of libpact_ffi against semver constraint >= 0.3.0, < 1.0.0
2022/06/09 15:54:22 [DEBUG] 0.3.2 satisfies constraints 0.3.2 >= 0.3.0, < 1.0.0
2022/06/09 15:54:22 [INFO] package libpact_ffi is correctly installed
2022/06/09 15:54:22 [DEBUG] skip checking ffi version() call because FFI not loaded. This is expected when running the 'pact-go' command.
? pact-go-issue-repro-20220607 git:(main) go test -run "^TestConsumerV3$" consumer_test.go
go: downloading github.com/stretchr/testify v1.7.2
go: downloading github.com/golang/protobuf v1.3.3
ok command-line-arguments 0.846s
? pact-go-issue-repro-20220607 git:(main) go test -timeout 30s -run "^TestV3HTTPProvider$" .
ok example.com/m 3.618s
? pact-go-issue-repro-20220607 git:(main) go test -v -timeout 30s -run "^TestV3HTTPProvider$" .
=== RUN TestV3HTTPProvider
2022/06/09 15:55:26 [INFO] package libpact_ffi found
2022/06/09 15:55:26 [INFO] checking version 0.3.2 for lib libpact_ffi within semver range >= 0.1.2, < 1.0.0
2022/06/09 15:55:26 [INFO] checking version 0.3.2 of libpact_ffi against semver constraint >= 0.1.2, < 1.0.0
2022/06/09 15:55:26 [DEBUG] 0.3.2 satisfies constraints 0.3.2 >= 0.1.2, < 1.0.0
2022/06/09 15:55:26 [DEBUG] version check completed
2022/06/09 15:55:26 [DEBUG] starting new proxy with opts {http localhost:8111 0 [0x4390e60 0x4391160 0x461c1c0] /__setup <nil>}
2022/06/09 15:55:26 [DEBUG] starting reverse proxy on port 64647
2022/06/09 15:55:26 [DEBUG] waiting for port 64647 to become available
2022/06/09 15:55:26 [DEBUG] pact provider verification
2022/06/09 15:55:26 [DEBUG] initialising rust mock server interface
2022/06/09 15:55:26 [DEBUG] waiting for port 64647 to become available
2022/06/09 15:55:26 [DEBUG] executing verifier FFI with args [--file /tmp/pact-go-issue-repro-20220607/pacts/PactGoV3Consumer-V3Provider.json --hostname localhost --port 64647 --provider-name V3Provider --loglevel trace]
Given User foo exists
WARNING: State Change ignored as there is no state change URL provided
2022/06/09 15:55:28 [DEBUG] HOOK request filter
2022/06/09 15:55:28 [DEBUG] http reverse proxy received connection from [::1]:64653 on path /foobar?baz=bar&baz=bat&baz=baz
2022/06/09 15:55:28 [DEBUG] setting proxy to target
2022/06/09 15:55:28 [DEBUG] incoming request /foobar?baz=bar&baz=bat&baz=baz
2022/06/09 15:55:28 [DEBUG] outgoing request to target
http://localhost:8111/foobar?baz=bar&baz=bat&baz=baz
2022/06/09 15:55:28 [TRACE] proxy outgoing request
POST /foobar?baz=bar&baz=bat&baz=baz HTTP/1.1
Host: localhost:8111
User-Agent: Pact Go
Content-Length: 76
Accept: */*
Accept-Encoding: gzip, deflate
Authorization: Bearer 1234
Authorization: Bearer 1234-dynamic-value
Content-Type: application/json
X-Forwarded-For: ::1
2022/06/09 15:55:28 [TRACE] proxied server response
HTTP/1.1 200 OK
Content-Length: 458
Content-Type: application/json
Date: Thu, 09 Jun 2022 05:55:28 GMT
{
"accountBalance": 123.76,
"datetime": "2020-01-01",
"equality": "a thing",
"id": 12,
"itemsMin": [
"thereshouldbe3ofthese",
"thereshouldbe3ofthese",
"thereshouldbe3ofthese"
],
"itemsMinMax": [
27,
27,
27,
27,
27
],
"lastName": "Sampson",
"name": "Billy",
"superstring": "foo",
"arrayContaining": [
"string",
1,
{
"foo": "bar"
}
]
}
2022/06/09 15:55:28 [DEBUG] executing after hook
2022/06/09 15:55:28 [DEBUG] HOOK after each
Given User foo exists
WARNING: State Change ignored as there is no state change URL provided
2022/06/09 15:55:28 [DEBUG] HOOK request filter
2022/06/09 15:55:28 [DEBUG] http reverse proxy received connection from [::1]:64656 on path /foobar?baz=bar&baz=bat&baz=baz
2022/06/09 15:55:28 [DEBUG] setting proxy to target
2022/06/09 15:55:28 [DEBUG] incoming request /foobar?baz=bar&baz=bat&baz=baz
2022/06/09 15:55:28 [DEBUG] outgoing request to target
http://localhost:8111/foobar?baz=bar&baz=bat&baz=baz
2022/06/09 15:55:28 [TRACE] proxy outgoing request
POST /foobar?baz=bar&baz=bat&baz=baz HTTP/1.1
Host: localhost:8111
User-Agent: Pact Go
Content-Length: 76
Accept: */*
Accept-Encoding: gzip, deflate
Authorization: Bearer 1234
Authorization: Bearer 1234-dynamic-value
Content-Type: application/json
X-Forwarded-For: ::1
2022/06/09 15:55:28 [TRACE] proxied server response
HTTP/1.1 200 OK
Content-Length: 458
Content-Type: application/json
Date: Thu, 09 Jun 2022 05:55:28 GMT
{
"accountBalance": 123.76,
"datetime": "2020-01-01",
"equality": "a thing",
"id": 12,
"itemsMin": [
"thereshouldbe3ofthese",
"thereshouldbe3ofthese",
"thereshouldbe3ofthese"
],
"itemsMinMax": [
27,
27,
27,
27,
27
],
"lastName": "Sampson",
"name": "Billy",
"superstring": "foo",
"arrayContaining": [
"string",
1,
{
"foo": "bar"
}
]
}
2022/06/09 15:55:28 [DEBUG] executing after hook
2022/06/09 15:55:28 [DEBUG] HOOK after each
Given User foo exists
WARNING: State Change ignored as there is no state change URL provided
2022/06/09 15:55:29 [DEBUG] HOOK request filter
2022/06/09 15:55:29 [DEBUG] http reverse proxy received connection from [::1]:64659 on path /foobar?baz=bar&baz=bat&baz=baz
2022/06/09 15:55:29 [DEBUG] setting proxy to target
2022/06/09 15:55:29 [DEBUG] incoming request /foobar?baz=bar&baz=bat&baz=baz
2022/06/09 15:55:29 [DEBUG] outgoing request to target
http://localhost:8111/foobar?baz=bar&baz=bat&baz=baz
2022/06/09 15:55:29 [TRACE] proxy outgoing request
POST /foobar?baz=bar&baz=bat&baz=baz HTTP/1.1
Host: localhost:8111
User-Agent: Pact Go
Content-Length: 76
Accept: */*
Accept-Encoding: gzip, deflate
Authorization: Bearer 1234
Authorization: Bearer 1234-dynamic-value
Content-Type: application/json
X-Forwarded-For: ::1
2022/06/09 15:55:29 [TRACE] proxied server response
HTTP/1.1 200 OK
Content-Length: 458
Content-Type: application/json
Date: Thu, 09 Jun 2022 05:55:29 GMT
{
"accountBalance": 123.76,
"datetime": "2020-01-01",
"equality": "a thing",
"id": 12,
"itemsMin": [
"thereshouldbe3ofthese",
"thereshouldbe3ofthese",
"thereshouldbe3ofthese"
],
"itemsMinMax": [
27,
27,
27,
27,
27
],
"lastName": "Sampson",
"name": "Billy",
"superstring": "foo",
"arrayContaining": [
"string",
1,
{
"foo": "bar"
}
]
}
2022/06/09 15:55:29 [DEBUG] executing after hook
2022/06/09 15:55:29 [DEBUG] HOOK after each
Verifying a pact between PactGoV3Consumer and V3Provider
A request to do a foo
returns a response which
has status code 200 (OK)
includes headers
"Content-Type" with value "application/json" (OK)
has a matching body (OK)
Verifying a pact between PactGoV3Consumer and V3Provider
A request to do a foo
returns a response which
has status code 200 (OK)
includes headers
"Content-Type" with value "application/json" (OK)
has a matching body (OK)
Verifying a pact between V3Consumer and V3Provider
A request to do a foo
returns a response which
has status code 200 (OK)
includes headers
"Content-Type" with value "application/json" (OK)
has a matching body (OK)
=== RUN TestV3HTTPProvider/Provider_pact_verification
--- PASS: TestV3HTTPProvider (3.10s)
--- PASS: TestV3HTTPProvider/Provider_pact_verification (0.00s)
PASS
ok
http://example.com/m 3.663s```