GH-0 Add integration test as a test containers #21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So.
The test is a crucial part of any project. It better to have the test immediately on go.
I use an integration test. It is more preferable to use a contract testing like but as far as out API is just a
standard crud and we have no complex service relations Pact is overkill.
Why docker containers?
Yep it a bit harder to write and a bit tricky to run
Maybe https://github.com/One-com/node-mocha-docker-postgres could make life a bit easier.
Main benefit. We set up a real DB and real full tuned server with all middleware and no magic env variable toggle that change how a system behaves.
Only one - we need to tune connection and preferably to use separate DB with a different name
It is still in progress.
I have covered a creation of item the happy path.