Skip to content

Allow pacts to be stored in a specified directory #7

@kpodl

Description

@kpodl

Hi there,
First of all: Great, that you have created pact-python! I was just in the process of trying to resuscitate another pact implementation for Python. Yours, however, is much nicer.
Here is my feature request in story form (as you seem to prefer them that way):

As a user creating consumer contracts,
I want to be able to specify a directory in which pacts, that have been successfully verified are stored,
and I want that pact files are named "sensibly" and that name clashes are automatically resolved,
So that I do not have to use a docker volume to collect pacts.

The idea would be to allow a directory to be specified in the has_pact_with() method which will be passed to the Pact instance. Then the pact returned by the POST to /pact in Pact.__exit__() can be saved to a file.
If there are no objections, I would be happy to submit a pull request!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions