Comments (7)
Can I just clarify the use case here. If Client A
is one of those clients, does it rely on all four providers?
from pact-go.
Sorry A-D are providers. We have one client that will generate 1 pact per pair for a total of 4 pacts.
Lets call our client "client". It seems the only way of doing it (that I can tell is to use option 1 listed here and provide the specific url. That is:
response = pact.VerifyProvider(types.VerifyRequest{
ProviderBaseURL: "http://myproviderhost",
PactURLs: []string{"http://broker/pacts/provider/B/consumer/client/latest/TAG_I_WANT_TO_TEST"},
})
from pact-go.
It would be nice if we could use option 3 from the above link and do this:
response = pact.VerifyProvider(types.VerifyRequest{
ProviderBaseURL: "http://myproviderhost",
BrokerURL: "http://brokerHost",
ProviderName: "B",
Tags: []string{"latest", "sit4"},
})
Becuase without limiting to provider "B" it will pick up the other providers pacts that are also tagged "latest". Does this make sense?
from pact-go.
Nevermind, I'm an idiot. VerifyProvider
is a method of Pact
which already has the info. ITs not very clear in the docs but thats my bad.
https://github.com/pact-foundation/pact-go/blob/master/dsl/pact.go#L239
from pact-go.
I was just doing a confirmation of this on the test.pact.dius.com.au broker, but glad you worked it out.
If this wasn't clear to you, it probably isn't clear to others either. How should we fix the docs to make it clearer, given that you were just surprised by it I'd like to tap into your brain!
from pact-go.
The code block from provider uses the pact
variable which I thought was the package. In the consumer section you walk through creating the pact
variable via dsl.pact{}
but it was never mentioned in the the provider section to recreate the pact
.
If that makes sense. I was just diving into the provider side, writing docs and standards for our team to use when deploying versions and tags. If i was writing the code I probably would have figured it out right away.
from pact-go.
OK yeah I gotcha. I'm looking forward to the day that I can make those code snippets testable!
from pact-go.
Related Issues (20)
- pact-go v2.0.x requires CGO HOT 2
- Unable to Call AddSynchronousMessage() Multiple Times within the same Go Test
- Provider verifier not working correctly when consumer uses matchers.Decimal HOT 2
- Is PactFileWriteMode no longer available? HOT 1
- Metadata information not getting recorded for protobuf-message HOT 1
- Protobuf cannot find enum with multiple proto files HOT 3
- requestMetadata expects exact value instead of matching type
- How to specify Pact CLI path in Go package manager HOT 7
- Add support for disabling colored output HOT 8
- Library not loaded: libpact_ffi.dylib HOT 22
- VerifyMessageConsumer failed: error creating message: exit status 255 HOT 1
- undefined structs running pact-go/v2 HOT 3
- BeforeEach method runs before every state HOT 6
- Why is there a functional pattern constructore for the installer? HOT 1
- Runtime error occurs with golang 1.22.x HOT 8
- Installation section of README.md is the wrong path HOT 1
- Current state of the go implementation and roadmap HOT 8
- "example=0" struct tags for numbers lead to wrong example values in contract HOT 1
- New release? HOT 5
- Incorrect header matching rules key in v2 pact files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pact-go.