Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Revert "Usage of postgres in test environment for database consistency (
Browse files Browse the repository at this point in the history
#686)" (#688)

This reverts commit 932a61f.
  • Loading branch information
fredrb authored Jul 29, 2020
1 parent b344143 commit f3d3114
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 26 deletions.
8 changes: 4 additions & 4 deletions common/persistence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.14.3</version>
<scope>test</scope>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
<scope>runtime</scope>
</dependency>
<dependency>
<!-- https://nvd.nist.gov/vuln/detail/CVE-2020-9488 -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- no permissions on H2 necessary
6 changes: 4 additions & 2 deletions common/persistence/src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
spring:
flyway:
enabled: true
locations: classpath:/db/migration
locations: classpath:/db/migration, classpath:/db/specific/{vendor}
datasource:
url: jdbc:tc:postgresql:11.8:///databasename?TC_TMPFS=/testtmpfs:rw
url: jdbc:h2:mem:test;MODE=PostgreSQL
driverClassName: org.h2.Driver
platform: h2
test:
database:
# Use datasource as defined above.
Expand Down
6 changes: 0 additions & 6 deletions services/distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.14.3</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
14 changes: 8 additions & 6 deletions services/distribution/src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ services:
spring:
main:
banner-mode: off
flyway:
enabled: true
locations: classpath:db/migration/postgres
jpa:
hibernate:
ddl-auto: validate
datasource:
url: jdbc:h2:mem:test;MODE=PostgreSQL
driverClassName: org.h2.Driver
platform: h2
test:
database:
# Use datasource as defined above.
replace: none
6 changes: 0 additions & 6 deletions services/submission/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@
<version>2.26.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.14.3</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
8 changes: 6 additions & 2 deletions services/submission/src/test/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ spring:
main:
banner-mode: off
datasource:
url: jdbc:tc:postgresql:11.8:///databasename?TC_TMPFS=/testtmpfs:rw
url: jdbc:h2:mem:test;MODE=PostgreSQL
driverClassName: org.h2.Driver
platform: h2
test:
database:
# Use datasource as defined above.
replace: none

services:
submission:
initial-fake-delay-milliseconds: 1
Expand Down Expand Up @@ -47,4 +51,4 @@ feign:
config:
default:
connect-timeout: 500
read-timeout: 500
read-timeout: 500

0 comments on commit f3d3114

Please sign in to comment.