Skip to content

Use TestContainers for integration tests #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mp911de opened this issue Dec 3, 2018 · 0 comments
Closed

Use TestContainers for integration tests #29

mp911de opened this issue Dec 3, 2018 · 0 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@mp911de
Copy link
Member

mp911de commented Dec 3, 2018

Right now, we require locally running databases to run our tests. We should allow for using TestContainers to reduce build requirements (Docker instead of multiple databases).

@schauder schauder self-assigned this Jan 15, 2019
schauder added a commit that referenced this issue Jan 15, 2019
schauder added a commit that referenced this issue Jan 15, 2019
… found.

Postgres integration tests now run either with a locally installed and started database or if no such database can be found an instance gets started in a Docker container via Testcontainers.
schauder added a commit that referenced this issue Jan 15, 2019
Formatting for improved readability.
Fixed cut'n'paste JavaDoc.
Copying over the port from configuration to `ConnectionFactory`.
schauder added a commit that referenced this issue Jan 16, 2019
We now prefer a database based on TestContainers.
Only if this can't be obtained do we try to access a local database for Postgres.

This minimizes the risk of accessing a database during tests that is not intended for that purpose.

If the system property `spring.data.r2dbc.test.preferLocalDatabase` is set to "true" the local database is preferred.
mp911de pushed a commit that referenced this issue Jan 18, 2019
Postgres integration tests now run either with a locally installed and started database or if no such database can be found an instance gets started in a Docker container via Testcontainers.

We prefer a database based on TestContainers. Only if this can't be obtained do we try to access a local database for Postgres.

This minimizes the risk of accessing a database during tests that is not intended for that purpose.

If the system property `spring.data.r2dbc.test.preferLocalDatabase` is set to "true" the local database is preferred.

Original pull request: #51.
mp911de added a commit that referenced this issue Jan 18, 2019
Add author tags. Add static factory method to create an unavailable database object instance. Simplify database selection. Javadoc.

Original pull request: #51.
@mp911de mp911de added the type: enhancement A general enhancement label Jan 18, 2019
@mp911de mp911de added this to the 1.0 M2 milestone Jan 18, 2019
@mp911de mp911de closed this as completed Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants