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

    GitHub

    01/05/2023, 5:47 PM
    #427 chore(deps): bump Newtonsoft.Json from 10.0.3 to 13.0.2 in /src/PactNet.Abstractions Pull request opened by dependabot[bot] Bumps Newtonsoft.Json from 10.0.3 to 13.0.2. Release notes Sourced from Newtonsoft.Json's releases.
    13.0.2
    • New feature - Add support for DateOnly and TimeOnly
    • New feature - Add UnixDateTimeConverter.AllowPreEpoch property
    • New feature - Add copy constructor to JsonSerializerSettings
    • New feature - Add JsonCloneSettings with property to disable copying annotations
    • Change - Add nullable annotation to JToken.ToObject(Type, JsonSerializer)
    • Change - Reduced allocations by reusing boxed values
    • Fix - Fixed MaxDepth when used with ToObject inside of a JsonConverter
    • Fix - Fixed deserializing mismatched JToken types in properties
    • Fix - Fixed merging enumerable content and validate content
    • Fix - Fixed using $type with arrays of more than two dimensions
    • Fix - Fixed rare race condition in name table when deserializing on device with ARM processors
    • Fix - Fixed deserializing via constructor with ignored base type properties
    • Fix - Fixed MaxDepth not being used with ISerializable deserialization
    13.0.1
    • New feature - Add JsonSelectSettings with configuration for a regex timeout
    • Change - Remove portable assemblies from NuGet package
    • Change - JsonReader and JsonSerializer MaxDepth defaults to 64
    • Change - Change InvalidCastException to JsonSerializationException on mismatched JToken
    • Fix - Fixed throwing missing member error on ignored fields
    • Fix - Fixed various nullable annotations
    • Fix - Fixed annotations not being copied when tokens are cloned
    • Fix - Fixed naming strategy not being used when deserializing dictionary enum keys
    • Fix - Fixed serializing nullable struct dictionaries
    • Fix - Fixed JsonWriter.WriteToken to allow null with string token
    • Fix - Fixed missing error when deserializing JToken with a contract type mismatch
    • Fix - Fixed JTokenWriter when writing comment to an object
    12.0.3
    • New feature - Added support for nullable reference types
    • New feature - Added KebabCaseNamingStrategy
    • Change - Package now uses embedded package icon
    • Fix - Fixed bug when merging JToken with itself
    • Fix - Fixed performance of calling ICustomTypeDescriptor.GetProperties
    • Fix - Fixed serializing Enumerable.Empty and empty arrays on .NET Core 3.0
    • Fix - Fixed deserializing some collection types with constructor
    • Fix - Fixed deserializing IImmutableSet to ImmutableHashSet instead of ImmutableSortedSet
    • Fix - Fixed deserializing IImmutableDictionary to ImmutableDictionary instead of ImmutableSortedDictionary
    • Fix - Fixed deserializing into constructors with more than 256 parameters
    • Fix - Fixed hang when deserializing JTokenReader with preceding comment
    • Fix - Fixed JSONPath scanning with nested indexer
    • Fix - Fixed deserializing incomplete JSON object to JObject
    • Fix - Fixed using StringEnumConverter with naming strategy and specified values
    12.0.2
    • New feature - Added MissingMemberHandling to JsonObjectAttribute and JsonObjectContract
    • New feature - Added constructor to JTokenReader to specify initial path
    • New feature - Added JsonProperty.IsRequiredSpecified
    • New feature - Added JsonContract.InternalConverter
    ... (truncated) Commits • `4fba53a` Remove prerelease for 13.0.2 • `b15df4b` Add missing headers • `789bfd3` Update to 13.0.2-beta3 • `b13717a` Add JsonCloneSettings to disable copy annotations (#2757) • `d0a328e` Fix MaxDepth not being used with ISerializable deserialization (#2736) • `aae9284` Update SDK • `bd98970` Update to 13.0.2-beta2 • `4dc9af6` Add roll forward to global.json (#2726) • `b8f4ef0` Fixing misspelling (#2698) • `cb9eed9` Fix deserializing via constructor with ignored base type properties (#2711) • Additional commits viewable in compare view Dependabot compatibility score Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
    @dependabot rebase
    . * * * Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: •
    @dependabot rebase
    will rebase this PR •
    @dependabot recreate
    will recreate this PR, overwriting any edits that have been made to it •
    @dependabot merge
    will merge this PR after your CI passes on it •
    @dependabot squash and merge
    will squash and merge this PR after your CI passes on it •
    @dependabot cancel merge
    will cancel a previously requested merge and block automerging •
    @dependabot reopen
    will reopen this PR if it is closed •
    @dependabot close
    will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually •
    @dependabot ignore this major version
    will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) •
    @dependabot ignore this minor version
    will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) •
    @dependabot ignore this dependency
    will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) •
    @dependabot use these labels
    will set the current labels as the default for future PRs for this repo and language •
    @dependabot use these reviewers
    will set the current reviewers as the default for future PRs for this repo and language •
    @dependabot use these assignees
    will set the current assignees as the default for future PRs for this repo and language •
    @dependabot use this milestone
    will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the Security Alerts page. pact-foundation/pact-net GitHub Actions: release GitHub Actions: release GitHub Actions: Build and Test (dotnet) (macos-latest) GitHub Actions: Build and Test (dotnet) (macos-latest) GitHub Actions: Build and Test (dotnet) (ubuntu-latest) GitHub Actions: Build and Test (dotnet) (ubuntu-latest) GitHub Actions: Build and Test (dotnet) (windows-latest) GitHub Actions: Build and Test (dotnet) (windows-latest) ✅ 1 other check has passed 1/9 successful checks
    • 1
    • 1
  • g

    GitHub

    01/05/2023, 5:47 PM
    #426 chore(deps): bump Newtonsoft.Json from 10.0.3 to 13.0.2 in /samples/EventApi/Consumer.Tests Pull request opened by dependabot[bot] Bumps Newtonsoft.Json from 10.0.3 to 13.0.2. Release notes Sourced from Newtonsoft.Json's releases.
    13.0.2
    • New feature - Add support for DateOnly and TimeOnly
    • New feature - Add UnixDateTimeConverter.AllowPreEpoch property
    • New feature - Add copy constructor to JsonSerializerSettings
    • New feature - Add JsonCloneSettings with property to disable copying annotations
    • Change - Add nullable annotation to JToken.ToObject(Type, JsonSerializer)
    • Change - Reduced allocations by reusing boxed values
    • Fix - Fixed MaxDepth when used with ToObject inside of a JsonConverter
    • Fix - Fixed deserializing mismatched JToken types in properties
    • Fix - Fixed merging enumerable content and validate content
    • Fix - Fixed using $type with arrays of more than two dimensions
    • Fix - Fixed rare race condition in name table when deserializing on device with ARM processors
    • Fix - Fixed deserializing via constructor with ignored base type properties
    • Fix - Fixed MaxDepth not being used with ISerializable deserialization
    13.0.1
    • New feature - Add JsonSelectSettings with configuration for a regex timeout
    • Change - Remove portable assemblies from NuGet package
    • Change - JsonReader and JsonSerializer MaxDepth defaults to 64
    • Change - Change InvalidCastException to JsonSerializationException on mismatched JToken
    • Fix - Fixed throwing missing member error on ignored fields
    • Fix - Fixed various nullable annotations
    • Fix - Fixed annotations not being copied when tokens are cloned
    • Fix - Fixed naming strategy not being used when deserializing dictionary enum keys
    • Fix - Fixed serializing nullable struct dictionaries
    • Fix - Fixed JsonWriter.WriteToken to allow null with string token
    • Fix - Fixed missing error when deserializing JToken with a contract type mismatch
    • Fix - Fixed JTokenWriter when writing comment to an object
    12.0.3
    • New feature - Added support for nullable reference types
    • New feature - Added KebabCaseNamingStrategy
    • Change - Package now uses embedded package icon
    • Fix - Fixed bug when merging JToken with itself
    • Fix - Fixed performance of calling ICustomTypeDescriptor.GetProperties
    • Fix - Fixed serializing Enumerable.Empty and empty arrays on .NET Core 3.0
    • Fix - Fixed deserializing some collection types with constructor
    • Fix - Fixed deserializing IImmutableSet to ImmutableHashSet instead of ImmutableSortedSet
    • Fix - Fixed deserializing IImmutableDictionary to ImmutableDictionary instead of ImmutableSortedDictionary
    • Fix - Fixed deserializing into constructors with more than 256 parameters
    • Fix - Fixed hang when deserializing JTokenReader with preceding comment
    • Fix - Fixed JSONPath scanning with nested indexer
    • Fix - Fixed deserializing incomplete JSON object to JObject
    • Fix - Fixed using StringEnumConverter with naming strategy and specified values
    12.0.2
    • New feature - Added MissingMemberHandling to JsonObjectAttribute and JsonObjectContract
    • New feature - Added constructor to JTokenReader to specify initial path
    • New feature - Added JsonProperty.IsRequiredSpecified
    • New feature - Added JsonContract.InternalConverter
    ... (truncated) Commits • `4fba53a` Remove prerelease for 13.0.2 • `b15df4b` Add missing headers • `789bfd3` Update to 13.0.2-beta3 • `b13717a` Add JsonCloneSettings to disable copy annotations (#2757) • `d0a328e` Fix MaxDepth not being used with ISerializable deserialization (#2736) • `aae9284` Update SDK • `bd98970` Update to 13.0.2-beta2 • `4dc9af6` Add roll forward to global.json (#2726) • `b8f4ef0` Fixing misspelling (#2698) • `cb9eed9` Fix deserializing via constructor with ignored base type properties (#2711) • Additional commits viewable in compare view Dependabot compatibility score Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
    @dependabot rebase
    . * * * Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: •
    @dependabot rebase
    will rebase this PR •
    @dependabot recreate
    will recreate this PR, overwriting any edits that have been made to it •
    @dependabot merge
    will merge this PR after your CI passes on it •
    @dependabot squash and merge
    will squash and merge this PR after your CI passes on it •
    @dependabot cancel merge
    will cancel a previously requested merge and block automerging •
    @dependabot reopen
    will reopen this PR if it is closed •
    @dependabot close
    will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually •
    @dependabot ignore this major version
    will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) •
    @dependabot ignore this minor version
    will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) •
    @dependabot ignore this dependency
    will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) •
    @dependabot use these labels
    will set the current labels as the default for future PRs for this repo and language •
    @dependabot use these reviewers
    will set the current reviewers as the default for future PRs for this repo and language •
    @dependabot use these assignees
    will set the current assignees as the default for future PRs for this repo and language •
    @dependabot use this milestone
    will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the Security Alerts page. pact-foundation/pact-net GitHub Actions: release GitHub Actions: release GitHub Actions: Build and Test (dotnet) (macos-latest) GitHub Actions: Build and Test (dotnet) (ubuntu-latest) GitHub Actions: Build and Test (dotnet) (windows-latest) GitHub Actions: Build and Test (dotnet) (macos-latest) GitHub Actions: Build and Test (dotnet) (ubuntu-latest) GitHub Actions: Build and Test (dotnet) (windows-latest) ✅ 1 other check has passed 1/9 successful checks
    • 1
    • 1
  • a

    Andre Rodrigues

    01/05/2023, 3:59 PM
    Hello Im looking for the use the specific pact version to verify my contract... In PACT URL for example, I have it: https://pactbroker/pacts/provider/my-provider/consumer/my-consumer/version/01001 However, in the consumer selectors I dont see any selector related to version... Can anyone help me to get the specific version directly in code?
    y
    m
    j
    • 4
    • 11
  • j

    Jay Li

    01/11/2023, 1:19 AM
    Anyone tried provider test on .net6? New .net6 removed startup how can we spin up the local service? Need help 😂
  • k

    komathypriya

    01/16/2023, 8:19 AM
    How do we publish the Pact to Pact IO using pactnet 4.3.0
  • k

    komathypriya

    01/16/2023, 8:28 AM
    Can anyone help me understanding Kafka Testing with Pactnet
    m
    • 2
    • 1
  • k

    komathypriya

    01/16/2023, 8:29 AM
    I am not able to publish the Pact to broker. I dont see PactPublisher in Pactnet4.30.0
    m
    • 2
    • 2
  • k

    komathypriya

    01/16/2023, 8:29 AM
    how do we publish Pacts with the latest Pactnet
  • g

    GitHub

    01/17/2023, 10:48 AM
    #437 chore: Upgrade FFI to version 0.4.0 Pull request opened by philek This version includes a fix for pact-foundation/pact-reference#231 pact-foundation/pact-net GitHub Actions: release ✅ 4 other checks have passed 4/5 successful checks
    • 1
    • 1
  • k

    komathypriya

    01/17/2023, 5:42 PM
    Hi Team, using Pact 3.x for CDT, and i use below code to publish the pact to pact io.PactPublisher pactPublisher = new PactPublisher("PactURL",pactUriOptions); pactPublisher.PublishToBroker(pactPath, "3.0",list);
  • k

    komathypriya

    01/17/2023, 5:43 PM
    This works fine, PACT is published
  • k

    komathypriya

    01/17/2023, 5:43 PM
    But with Version 4.x, where i am using PACT to test Messaging, i would like to publish the PACT to Pact io, but i dont see the Pact Publisher class
  • k

    komathypriya

    01/17/2023, 5:44 PM
    Can anyone help me on how to publish the pACT to pact io, with version 4.x
    y
    m
    • 3
    • 2
  • g

    GitHub

    01/17/2023, 9:00 PM
    1 new commit pushed to
    <https://github.com/pact-foundation/pact-net/tree/master|master>
    by adamrodger
    <https://github.com/pact-foundation/pact-net/commit/f8597111f9f452010048129d16d0581e075463d3|f8597111>
    - chore: Upgrade FFI to version 0.4.0 pact-foundation/pact-net
  • d

    Dom Barnett

    01/19/2023, 9:32 AM
    @Dom Barnett has left the channel
  • k

    komathypriya

    01/21/2023, 6:34 PM
    Hi Team, i am trying to setup CI/CD pipeline for my consumer and provider in Gitlab. With the example here https://docs.pactflow.io/docs/workshops/ci-cd/set-up-ci i am not able to configure. Is there a way from Pact team we can have a working session to help me and run the pipeline
    m
    • 2
    • 5
  • b

    BENJAMIN J HESS

    01/24/2023, 12:06 AM
    Is it still the case that Pact-net can't use V4 Pact files in Provider tests? Or is that inaccurate?
    m
    y
    • 3
    • 13
  • g

    GitHub

    01/25/2023, 3:58 AM
    #438 Receiving verification mismatch while trying customised Content-type with Pact-net. Issue created by nikhil4892 I am trying to perform customer test using Pact net and we are using "application/com.ab.c.orderbook+json" as "Content-Type". But I am getting verification mismatch. The content type I am defining the arrangement is taking only "application/json" and the contract is getting mismatched from the content type "application/com.ab.c.orderbook+json" set while mocking the api. Can't we pass customised content-type in Pact-net? Please suggest how to solve this issue! pact-foundation/pact-net
    • 1
    • 1
  • g

    GitHub

    01/25/2023, 12:28 PM
    #439 feat: Support provider state teardown requests (#421) Pull request opened by philek Adding support for provider state teardown requests and state sent as query params. This is based on #422. pact-foundation/pact-net GitHub Actions: release ✅ 4 other checks have passed 4/5 successful checks
    • 1
    • 1
  • v

    Victor Lau

    01/26/2023, 12:04 AM
    Does anyone have suggestions on how to debug my issue better? I keep getting a
    500
    request mismatch from Pact. I'm aware that my expected request is not the same, but I am trying to write an SDK contract as a demo and reverse-engineering the request for my test setup. Deleted some actual data for privacy purposes.
    Copy code
    "{\"error\":\"Request-Mismatch : HttpRequest { method: \\\"POST\\\", path: \\\"/\\\", query: Some({\\\"api-version\\\": [\\\"1.0\\\"]}), headers: Some({\\\"user-agent\\\": [\\\"\\\"], \\\"content-length\\\": [\\\"848\\\"], \\\"connection\\\": [\\\"Keep-Alive\\\"], \\\"authorization\\\": [\\\"Bearer Access-Token\\\"], \\\"host\\\": [\\\"127.0.0.1:59176\\\"], \\\"expect\\\": [\\\"100-continue\\\"], \\\"content-type\\\": [\\\"application/json\\\"], \\\"x-mt-secondaryid\\\": [\\\"\\\"]}), body: Present", Some(ContentType { main_type: \\\"application\\\", sub_type: \\\"json\\\", attributes: {}, suffix: None }), None), matching_rules: MatchingRules { rules: {} }, generators: Generators { categories: {} } }\"}"
    m
    • 2
    • 18
  • g

    GitHub

    01/26/2023, 4:13 PM
    #440 chore: /s/Pactflow/PactFlow Pull request opened by YOU54F pact-foundation/pact-net GitHub Actions: release GitHub Actions: release ✅ 7 other checks have passed 7/9 successful checks
    • 1
    • 1
  • g

    GitHub

    01/27/2023, 10:49 AM
    #441 Is there anyway to configure RedirectHandling in Pact-Net similar to Pact JVM Issue created by ImNag I see there is a configuration to enable/ disable RedirectHandling
    pact.verifier.enableRedirectHandling
    for Provider Verification in Pact JVM. Wondering, if there is similar configuration is Pact Net. Currently, i observe Pact Net verifier tries to handle the redirection when there is 301 status. Wondering, if we can disable such behaviour. Using PactNet Version="4.3.0" From Pact JVM docs:

    Screenshot 2023-01-27 at 17 44 03▾

    pact-foundation/pact-net
  • e

    Eddie Stanley

    02/01/2023, 10:43 PM
    When we call
    Verify
    on our
    IPactVerifierSource
    , we interop into the Rust code which actually verifies the interations. When verifying a given interaction, what is the sequence of events? Specfically, my question is what happens if the interaction is missing the
    providerState
    key
    - will it still call the provider states endpoint or will it skip that and go directly to making the request? We're on version 4.1.0 of PactNet if it's relevant.
    m
    • 2
    • 9
  • g

    GitHub

    02/03/2023, 3:22 PM
    1 new commit pushed to
    <https://github.com/pact-foundation/pact-net/tree/master|master>
    by YOU54F
    <https://github.com/pact-foundation/pact-net/commit/7384588090b9c058727b4ad5532bc5fa53cd6c94|73845880>
    - chore: /s/Pactflow/PactFlow (#440) pact-foundation/pact-net
  • g

    Gazal Gafoor

    02/04/2023, 1:00 AM
    @Gazal Gafoor has left the channel
  • s

    Steven Ng

    02/06/2023, 5:00 AM
    Hi #C9UTHV2AD, It seems that "branch" and "tags" does not get populated in Pactflow as configured in PactVerifier for my Provider Pact test. After test run, only "Provider Version" gets populated but not Branch and Tags. I'm using PactNet 4.3.0. Could anyone advice on how to fix this?
    Copy code
    [Fact]
            public async void Ensure_Api_Honours_PactWithConsumers()
            {
                var config = new PactVerifierConfig
                {
                    Outputters = new List<IOutput>
                    {
                        new XUnitOutput(_output),
                    },
                    LogLevel = PactNet.PactLogLevel.Trace
                };
    
                IPactVerifier pactVerifier = new PactVerifier(config);
    
                Assert.True(PactInvoker.IsRunning(out _));
    
                pactVerifier
                    .ServiceProvider("DemoMicroservice", _serverUri)
                    .WithPactBrokerSource(PactBrokerUrl,
                        (c) =>
                        {
                            c.TokenAuthentication(PactBrokerToken);
                            c.ConsumerTags(PactBrokerConsumerTags);
                            c.PublishResults(PactBrokerProviderVersion);
                            c.ProviderBranch(PactBrokerProviderBranch);
                            c.ProviderTags(PactBrokerProviderTags);
                        })
                    .WithProviderStateUrl(new Uri(_serverUri, ProviderStatesEndpoint))
                    .Verify();
            }
    m
    u
    • 3
    • 15
  • p

    Pallavi Anirban Bose

    02/08/2023, 1:36 PM
    Hi #C9UTHV2AD , I'm trying to run consumer pact from pact broker new PactVerifier(config) .ServiceProvider("provider", WebAppUrl) .HonoursPactWith("consumer") //.PactUri(@"C:\SSPL\hiiretail-sslp-customer-service\CustomerService_PactTest\pacts\sslp-customerpact-sslp-customerservice.json") .PactBroker("https://pact-broker.retailsvc.com/pacts/provider/provider/consumer/consumer/latest") .Verify(); but getting SSL error..is there any way to bypass SSL validation? Need help to troubleshoot Below is the error log opening connection to pact-broker.retailsvc.com:443... opened starting SSL for pact-broker.retailsvc.com:443... SSL established Conn close because of connect error SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
    m
    s
    • 3
    • 61
  • g

    GitHub

    02/12/2023, 2:21 PM
    1 new commit pushed to
    <https://github.com/pact-foundation/pact-net/tree/master|master>
    by adamrodger
    <https://github.com/pact-foundation/pact-net/commit/18e00c49a27a411aff715e62a09f3b78b0a737a0|18e00c49>
    - chore: Bump version to 4.4.0 pact-foundation/pact-net
  • g

    GitHub

    02/12/2023, 2:28 PM
    Release - 4.4.0 New release published by github-actions[bot] pact-foundation/pact-net
  • g

    GitHub

    02/12/2023, 3:16 PM
    1 new commit pushed to
    <https://github.com/pact-foundation/pact-net/tree/master|master>
    by adamrodger
    <https://github.com/pact-foundation/pact-net/commit/c2ec3cc4b1a4f65b99aaaa7625af49bf6fbc4700|c2ec3cc4>
    - feat: Configure provider state endpoint options pact-foundation/pact-net
1...456...9Latest