Code Monkey home page Code Monkey logo

Comments (5)

mefellows avatar mefellows commented on July 26, 2024 1

OK unfortunately my docs were out of date @gallamine, the parameter should have been merge instead of update. Also, the behaviour of that flag changed and I hadn't updated. I've pushed an update just now and tested locally - a new beta build should be pushed up shortly . Could you please let me know if that fixes it?

from pact-go.

mefellows avatar mefellows commented on July 26, 2024

Hi @gallamine, this is expected behaviour.

Check out splitting tests across multiple files. Basically, each time you instantiate a Pact struct with the same set of consumers/providers, we need to know if it's a new set of interactions, or just an addition to the previous. By default, we assume it's a new set that replaces the old.

Check out how the example consumer test does this with TestMain. Alternatively, set the pact file write mode to update.

from pact-go.

gallamine avatar gallamine commented on July 26, 2024

This is helpful. Thanks! I've tried modifying my pact to look like this:

pact := &dsl.Pact{
		Port: 6666,
		Consumer: "Loader",
		Provider: "score_server",
		Host: "localhost",
		PactFileWriteMode: "update",
	}

in both test cases, but the behavior still persists. I've thus moved to using Golang subtests to only use one pact definition.

from pact-go.

mefellows avatar mefellows commented on July 26, 2024

Mmm that shouldn't happen though, I'll reopen and investigate

from pact-go.

mefellows avatar mefellows commented on July 26, 2024

Closing this due to inactivity. I believe the issue is sorted, please re-open if there are further issues.

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.