Closed cyrusdevnomad closed 2 years ago
Thank you.
As discussed in slack, the issue seems to be that you can't pass --uri
without also passing --broker-url
which seems incorrect at first glance and results in awkward use of the .NET interface at least.
We'll take a look.
This is probably not an issue after PactNet moved to a handles-based approach for verification instead of this older CLI args style.
The PactNet API has moved on quite significantly from this both internally and externally so this is no longer applicable and can be closed I think.
Hi In the following code, the if path does not work:
In the code above if the verify pact changed pipeline is triggered from PactFlow webhook and the if path with pactVerifier.FromPactUri() is executed the following URL is passed to Uri tmpPactUri = new Uri(tmpPactUrl, UriKind.Absolute) and I get the error message further down bellow: https://xxxxx.pactflow.io/pacts/provider/ProductService/consumer/ApiClient/pact-version/xxxxxxxxxx/metadata/xxxxxxxxxxxxxxxxxxxxxx
I get the following error message:
PactNet.PactFailureException : Invalid arguments were provided to the verification process Stack Trace: at PactNet.Native.NativePactVerifier.Verify(String args) in /Users/erikdanielsen/work/dius/pact-net/src/PactNet.Native/NativePactVerifier.cs:line 42 at PactNet.Native.PactVerifier.Verify() in /Users/erikdanielsen/work/dius/pact-net/src/PactNet.Native/PactVerifier.cs:line 240 at tests.ProductTest.EnsureProviderApiHonoursPactWithConsumer() in D:\a\1\s\tests\ProductTest.cs:line 98 Standard Output Messages: Invoking the pact verifier with args: --url https://xxxxxx.pactflow.io/pacts/provider/ProductService/consumer/ApiClient/pact-version/xxxxxxxxxxxxxxxxxxxxxxxxx/metadata/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --state-change-url http://127.0.0.1:9001/provider-states --provider-name ProductService --hostname 127.0.0.1 --port 9001 --filter-consumer ApiClient --publish --provider-version xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --provider-tags master --loglevel trace
The exception above is not thrown if the method .FromPactBroker() is added to the if path as follows:
Thanks