Skip to content

Clarification of text in README.md #688

@kbalk-maxar

Description

@kbalk-maxar

What action do you want to perform

I'm struggling to understand the following excerpt from the README.md. I have postgresql running in a docker container with an existing database ('foo', for example) pre-populated with tables and data. I read the following excerpt and thought that if I specify my database 'foo' for both factory calls, it would copy the contents of 'foo' to the 'test' database. That doesn't appear to be the case. I might be misunderstanding the terms used in this text.

You can also define your own database name by passing same dbname value to both factories.

The way this will work is that the process fixture will populate template database, which in turn will be used automatically by client fixture to create a test database from scratch. Fast, clean and no dangling transactions, that could be accidentally rolled back.

Same approach will work with noproces fixture, while connecting to already running postgresql instance whether it'll be on a docker machine or running remotely or locally.

It appears I could write a function to copy the 'foo' database to the 'test' database and provide that function name in the "load" argument to the factory to achieve the desired results. But I wanted to verify there wasn't an easier way per the text above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions