https://pact.io logo
Join Slack
Powered by
# pact-go
  • g

    GitHub

    03/06/2025, 7:15 PM
    Release - v2.3.0 New release published by mefellows ## Changelog • bd5ea1c chore(release): release v2.3.0 • e6e2c11 feat: add metadata.pact-go.version to pact file • 1e4ecc7 fix(deps): update module github.com/spf13/cobra to v1.9.1 (#502) • e05acfd fix(deps): update module google.golang.org/grpc to v1.70.0 (#495) • 6c40e0b fix(deps): update module google.golang.org/protobuf to v1.36.5 (#496) • 8d700cc fix: strip v prefix from pact-go verifier version pact-foundation/pact-go
  • d

    David Gibson

    03/07/2025, 10:52 AM
    Is there a pact-mock-server that supports the latest version of PACT?
    y
    • 2
    • 16
  • d

    David Gibson

    03/07/2025, 10:54 AM
    Im currently using https://github.com/pact-foundation/pact-mock_service for a consumer test which I can write out a PACT contract, but we I verify the contract I am getting an error stating that 'type' attribute is missing, so I suspect the pact-mock-service is runnign an older version of PACT
  • m

    Martin Mineo

    03/07/2025, 1:16 PM
    @Martin Mineo has left the channel
  • g

    GitHub

    03/24/2025, 1:04 AM
    Release - v2.4.0 New release published by mefellows ## Changelog • 9e92fc2 chore(deps)!: require minimum go version 1.23 • 6ba0381 chore(release): release v2.4.0 • ada7782 fix(deps): update module google.golang.org/grpc to v1.71.0 pact-foundation/pact-go
  • g

    GitHub

    03/24/2025, 1:34 AM
    Release - v2.4.1 New release published by mefellows ## Changelog • 9e92fc2 chore(deps)!: require minimum go version 1.23 • 2f21a81 chore(release): release v2.4.0 • 0f6597b chore(release): release v2.4.1 • ada7782 fix(deps): update module google.golang.org/grpc to v1.71.0 • eba6b2c fix: update pact-ffi to 0.4.27 (#509) pact-foundation/pact-go
  • s

    Srinivas Nali

    04/01/2025, 3:04 PM
    Hi Guys, Is anyone facing issues with Pact-Go compatibility on Go 1.22? Running:
    Copy code
    go install <http://github.com/pact-foundation/pact-go/v2@latest|github.com/pact-foundation/pact-go/v2@latest>
    fails, but if I remove
    @latest
    , it works fine. Would it be possible to document Go version compatibility in the README? That would be really helpful. Thanks
    m
    y
    • 3
    • 4
  • e

    Erich Zimmerman

    04/01/2025, 9:35 PM
    @Erich Zimmerman has left the channel
  • y

    Yevhen Nosulko

    05/02/2025, 9:45 AM
    hello lovely people. I am having a problem with pact-go Provider verification test where it cannot read the provider states from a contract json generated by pact-jvm. There is a mismatch in how the contract JSON is generated by pact-jvm and pact-go. Let me explain a bit more. We have a Consumer test written in Java with pact-jvm, snippet below:
    Copy code
    @Pact(provider = PROVIDER, consumer = CONSUMER)
        public RequestResponsePact operationalHealth(PactDslWithProvider builder) {
            return builder
                .given("IFE functionalHealth is Operational")
                .uponReceiving("A request for IFE availability status Operational")
    ...
    ...
    ...
    this will generate a contract where provider state is defined as an Array of Strings:
    Copy code
    "interactions": [
        {
          "description": "A request for IFE availability status Operational",
          "providerStates": [
            {
              "name": "IFE functionalHealth is Operational"
            }
          ],
    on the provider side we have a Provider test written in Golang with pact-go, snippet as follows:
    Copy code
    StateHandlers: models.StateHandlers{
    			"IFE functionalHealth is Operational": func(setup bool, ps models.ProviderState) (models.ProviderStateResponse, error) {
    ...
    ...
    ...
    and the problem is when I run this test it doesn't seem to read the provider states at all because when I tried to pusposely break it it was still passing. I went ahead and created a similar consumer test in Golang, like this:
    Copy code
    mockProvider.
    		AddInteraction().
    		Given("IFE functionalHealth is Operational").
    		UponReceiving("A request for IFE availability status Operational").
    ...
    ...
    ...
    ...
    after running this test I got the contract JSON where provider state is defined as String:
    Copy code
    "interactions": [
        {
          "description": "A request for IFE availability status Operational",
          "providerState": "IFE functionalHealth is Operational",
    this contract is then consumed and parsed correctly by provider test because when I try to break it I see a corresponding provider state failing. Are you guys aware of similar issues? If so how do I go about addressing it? Thank you in advance.
    m
    y
    • 3
    • 17
  • j

    James P

    07/01/2025, 7:07 PM
    Hello, Is there an equivalent setting in Go for the Java attribute
    IgnoreNoPactsToVerify
    ?
    👋 1
    m
    • 2
    • 2
  • m

    Michiel Rogissart

    07/15/2025, 7:22 AM
    We recently started incorporating contract testing in our tests using pact-go. This all felt very easy and natural, but things got a bit awkward for integration tests. Multiple services need to be mocked, so I'm nesting the
    ExecuteTest
    methods of the different MockProviders a bit like so
    Copy code
    mockProvider1.ExecuteTest(t, func(service1Config consumer.MockServerConfig) {
    	err := mockProvider2.ExecuteTest(t, func(service2Config consumer.MockServerConfig) {
    		c, err := createClient(service1Config, service2Config)
    		// test logic here
    	})
    })
    Is this the way to do it or am I doing something wrong? Should I not use contract testing in the integration tests, or am I missing a pattern in the pact-go lib?
    m
    • 2
    • 7
  • d

    Dominick Campbell

    07/18/2025, 8:20 PM
    @Dominick Campbell has left the channel
  • a

    aofadero

    08/28/2025, 3:47 PM
    Hey everyone, my team is looking start adding consumer driven contract tests as part of the tools we use with testing our microservices and one of the things that we want to do as a start is refactor the way setup our services. By this I mean currently in the
    main.go
    file for a service, there is a lot of setup (e.g grpc server, db connections, config refs) and we would like to abstract this to a service file so that it's no longer done in
    main.go
    . Is this the right approach or are there better established patterns to use?
    y
    • 2
    • 2
  • p

    Paul

    09/12/2025, 5:17 AM
    @Paul has left the channel
  • e

    Elson Ho

    09/19/2025, 2:31 AM
    @Elson Ho has left the channel
  • k

    Kieran McCarthy

    10/11/2025, 10:48 AM
    @Kieran McCarthy has left the channel
  • g

    GitHub

    10/31/2025, 12:24 AM
    Release - v2.4.2 New release published by mefellows ## Changelog • cf595b9 chore(ci): test golang 1.25.x • 9e92fc2 chore(deps)!: require minimum go version 1.23 • 9f61858 chore(deps): update actions/checkout action to v5 • 21c7ad2 chore(deps): update actions/setup-go action to v6 • 9874be3 chore(deps): update actions/setup-java action to v5 • 6e0fc5b chore(deps): update actions/upload-artifact action to v5 • 4f4c646 chore(deps): update dependency go to v1.24.4 • 6057b94 chore(deps): update dependency go to v1.24.4 • e95697e chore(deps): update dependency go to v1.24.5 • 2f21a81 chore(release): release v2.4.0 • 958e940 chore(release): release v2.4.1 • a3205d4 chore(release): release v2.4.2 • 3b54121 fix(deps): update module github.com/linkedin/goavro/v2 to v2.14.0 • 54a7927 fix(deps): update module github.com/linkedin/goavro/v2 to v2.14.1 • e71bdf9 fix(deps): update module github.com/spf13/afero to v1.14.0 • 2f3434e fix(deps): update module github.com/spf13/afero to v1.15.0 • 2f380fa fix(deps): update module github.com/spf13/cobra to v1.10.1 • 1959765 fix(deps): update module github.com/stretchr/testify to v1.11.1 • ada7782 fix(deps): update module google.golang.org/grpc to v1.71.0 • 78b4c21 fix(deps): update module google.golang.org/grpc to v1.73.0 • a2a24f3 fix(deps): update module google.golang.org/protobuf to v1.36.10 • b8a22ed fix(deps): update module google.golang.org/protobuf to v1.36.6 • 31d8d7f fix: convert the byte slice to string, async message WithContents • eba6b2c fix: update pact-ffi to 0.4.27 (#509) • c34f417 fix: update pact-ffi to 0.4.28 (#533) pact-foundation/pact-go
  • b

    Brad Momberger

    11/21/2025, 3:26 PM
    Hi everyone, I’ve been trying to work out an issue that I’ve been having with pact-go on Windows 11. I’m newly on a client project and I am new to Go development, Go on Windows, and testing with Pact. With Go 1.25.4 and GCC/MinGW 13.2.0, when I try to run the tests, I’m seeing tests in our services repo fail to build, and spit out these errors before failing:
    Copy code
    # <http://github.com/pact-foundation/pact-go/v2/internal/native|github.com/pact-foundation/pact-go/v2/internal/native>
    cgo: inconsistent definitions for C.pactffi_given_with_param
    cgo: inconsistent definitions for C.pactffi_given
    I don’t yet know how to do a reduced case for a GH issue, or if it’s even a real issue, so I’m looking for suggestions as to why this might be happening on my platform and how to work around it. Thanks for your help.
    m
    s
    • 3
    • 10
  • p

    Paul Williams

    03/02/2026, 8:38 AM
    @Paul Williams has left the channel
  • n

    Norbert Gulácsi

    03/25/2026, 12:17 PM
    @Norbert Gulácsi has left the channel
  • g

    GitHub

    04/22/2026, 4:20 AM
    Release - v2.4.3 New release published by mefellows Changelog • e0a4fc8 chore(release): release v2.4.3 • f7cec64 fix: resolve "inconsistent definitions" build failure on Go 1.24+ (#568) • dfe16cc fix: upgrade goreleaser config to v2 and fix workflow_dispatch release trigger (#571) pact-foundation/pact-go
    smooth parrot 1
  • s

    Stanislav Vodetskyi

    05/21/2026, 8:07 PM
    Can you please take a look at this small PR? https://github.com/pact-foundation/pact-go/pull/577 written by AI of course 🙂
    ✅ 1
    m
    • 2
    • 13
  • g

    GitHub

    05/24/2026, 11:17 AM
    Release - v2.5.0 New release published by mefellows Changelog • 4be0196 chore(deps): update actions/checkout action to v6 (#547) • 78a41e9 chore(deps): update actions/upload-artifact action to v7 (#556) • 3c4ec69 chore(deps): update dependency golangci/golangci-lint to v2.12.2 (#572) • 769772f chore(deps): update golang docker tag to v1.26 (#570) • f84e41d chore(release): release v2.5.0 • 1342c81 feat(provider): expose verifier error sentinels for errors.Is discrimination (#577) • 889dc1e fix(deps): update module google.golang.org/grpc to v1.81.1 (#574) pact-foundation/pact-go
  • g

    GitHub

    05/26/2026, 6:44 AM
    Release - v2.5.1 New release published by mefellows Changelog • ba5ba8a chore(release): release v2.5.1 • a8b37f1 docs(native): note ErrVerifierFailed and ErrVerifierFailedToRun are mutually exclusive (#579) pact-foundation/pact-go
  • g

    GitHub

    08/05/2026, 3:20 AM
    Release - v2.6.0 New release published by mefellows 2.6.0 (2026-08-05) Features • provider: add SoftFail mode for downstream-gated verification (#580) (5f12bb9) pact-foundation/pact-go
  • g

    GitHub

    08/07/2026, 1:16 PM
    Release - v2.7.0 New release published by mefellows 2.7.0 (2026-08-06) Features • add external reference (#592) (d32f05e) pact-foundation/pact-go
    🎉 1
  • s

    Stanislav Vodetskyi

    08/26/2026, 2:28 AM
    Can you please review https://github.com/pact-foundation/pact-go/pull/605 2.7.0 pinned a newer ffi and introduced breaking changes through that. So we're pinning the ffi version in the installer
    thankyou 1
  • m

    Matt (pactflow.io / pact-js / pact-go)

    08/26/2026, 4:39 AM
    I’ll take a look today Stan, thanks for raising it
    thankyou 1
  • g

    GitHub

    08/26/2026, 6:31 AM
    Release - v2.7.1 New release published by mefellows 2.7.1 (2026-08-26) Bug Fixes • deps: update module google.golang.org/grpc to v1.83.0 (#585) (52a2cb4) • installer: pin libpact_ffi semver range to the shipped minor (#605) (ae9fe5f) pact-foundation/pact-go
    👌 1
  • g

    GitHub

    09/16/2026, 11:58 AM
    Release - v2.8.0 New release published by mefellows 2.8.0 (2026-09-16) Features • bump pact-ffi to 0.5.8 (a1e8386) Bug Fixes • check, propagate, or deliberately discard error returns; fix two nilnesserr bugs (a90ecf3) • ci: pin lint toolchain to go.mod and drop deprecated DualStack (c480099) • deps: update module github.com/stretchr/testify to v1.12.1 (459dd96) • wait for a plugin transport to accept before returning its port (6fcc07f) pact-foundation/pact-go