Code Monkey home page Code Monkey logo

Comments (7)

mefellows avatar mefellows commented on July 26, 2024

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.

zbintliff avatar zbintliff commented on July 26, 2024

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.

zbintliff avatar zbintliff commented on July 26, 2024

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.

zbintliff avatar zbintliff commented on July 26, 2024

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.

mefellows avatar mefellows commented on July 26, 2024

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.

zbintliff avatar zbintliff commented on July 26, 2024

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.

mefellows avatar mefellows commented on July 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.