gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damien Raude-Morvan (Jira)" <j...@apache.org>
Subject [jira] [Commented] (GORA-647) Use Testcontainers for MongoDB integration tests
Date Tue, 24 Mar 2020 00:23:00 GMT

    [ https://issues.apache.org/jira/browse/GORA-647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17065209#comment-17065209

Damien Raude-Morvan commented on GORA-647:


 * Update {{gora-mongodb/pom.xml}} to use testcontainers
 ** Remove {{de.flapdoodle.embed.mongo}} dependency
 ** Remove {{mongo.embed.version}} property
 ** Add {{org.testcontainers}} dependency
 * Create {{MongoContainer}} and it as a JUnit {{@ClassRule}}
 * Add new test for MongoDB 4.2
 * Refactor {{GoraMongodbTestDriver}}
 ** Provided container (passed in constructor) to configure Gora properties
 * Update {{gora-benchmark/pom.xml}} to depends on {{gora-mongodb:test-jar}}
 We can import MongoContainer in GoraClientTest
 (with fixed MongoDB port on localhost)
 * Refactor {{GoraMongodbAuthenticationTestDriver}}
 ** Use MongoDB docker container feature to initialize superuser (via environment variables)
 ** Pass {{--auth}} and {{--setParameter authenticationMechanisms}} as commands
 ** Use mongo shell CLI - inside container - to execute script

> Use Testcontainers for MongoDB integration tests
> ------------------------------------------------
>                 Key: GORA-647
>                 URL: https://issues.apache.org/jira/browse/GORA-647
>             Project: Apache Gora
>          Issue Type: Test
>          Components: gora-mongodb
>    Affects Versions: 0.9
>            Reporter: Damien Raude-Morvan
>            Assignee: Damien Raude-Morvan
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
> It seems that [flapdoodle.embed.mongo|https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo]
artifact actually used for {{gora-mongodb}} integration tests is a bit outdated (ie. no support
for latest MongoDB 4.2) and have no new commits since at least 6 months.
> I would like to align {{gora-mongodb}} integration tests with other Gora modules so that
we also use [testcontainers|https://www.testcontainers.org/] which seems to provide more
easier to maintain code (for instance, [mongo|https://hub.docker.com/_/mongo] docker container
provide authentication support!)

This message was sent by Atlassian Jira

View raw message