Skip to content

Improve process of running tests locally #261

Closed
@maxceem

Description

@maxceem

So far to run tests locally during development process we should rebuild and restart the Docker which makes it hard to run tests during development. And if after we want to continue developing we have to it again to switch back to the main DB, and we will also lose any data in our DB. This makes running test during development very time-consuming.

// stop already executing containers if any
docker-compose stop -t 1
// clear the containers
docker-compose rm -f
// re-run the services with build flag
docker-compose up --build

I'm thinking to ask the community to fix this and let us run tests without the necessity of rebuilding the Docker containers by simply running npm run test.

I see two ways to accomplish it:

  1. The simple way would be to add one more instance of postgres in docker-compose but we will have two instances running which is not that good.

  2. The better way would be to use one instance but create two DBs projectsdb and projectsdb_test. Unfortunately, standard postgres image doesn't support creating several DBs so probably we will have to create a custom image with such support for example, as mentioned in this issue.

@vikasrohit what do you think?

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