Skip to content

Commit

Permalink
(lib,test) use embedded mongodb during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlermitage committed Jan 27, 2018
1 parent ad9f4d6 commit 37e1be5
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
<testng.version>6.13.1</testng.version>
<rest-assured.version>3.0.6</rest-assured.version>
<mockito-core.version>2.13.0</mockito-core.version>
<embed.mongo.version>2.0.0</embed.mongo.version>
<embedmongo-spring.version>1.3.1</embedmongo-spring.version>

<!-- JSON -->
<jackson.version>2.9.4</jackson.version>
Expand Down Expand Up @@ -383,6 +385,19 @@
<version>${hsqldb.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>${embed.mongo.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>cz.jirutka.spring</groupId>
<artifactId>embedmongo-spring</artifactId>
<version>${embedmongo-spring.version}</version>
<scope>test</scope>
</dependency>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Annotations. -->
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
spring:
data:
mongodb:
host: localhost
port: 27017
database: manondev
username: root
password: woot
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
spring:
data:
mongodb:
host: ${MANON_PROD_MONGODB_HOST}
port: ${MANON_PROD_MONGODB_PORT}
database: ${MANON_PROD_MONGODB_DB_NAME}
username: ${MANON_PROD_MONGODB_USERNAME}
password: ${MANON_PROD_MONGODB_PASSWORD}
Expand Down
4 changes: 0 additions & 4 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

spring:
batch.job.enabled: false
data:
mongodb:
host: localhost
port: 27017
jpa.hibernate.ddl-auto: update
http.converters.preferred-json-mapper: jackson

Expand Down
6 changes: 0 additions & 6 deletions src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
### DEV CONFIGURATION for local unit testing ### (warning: avoid tabs, indent with two spaces)

spring:
data:
mongodb:
database: manontest
username: root
password: woot
authentication-database: manontest
jpa.hibernate.ddl-auto: create

manon:
Expand Down

0 comments on commit 37e1be5

Please sign in to comment.