Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit 9b8b5b96 authored by Bergamote Orange's avatar Bergamote Orange
Browse files

before test emptying base

parent cf0d61eb
Pipeline #273966 failed with stages
in 19 minutes and 15 seconds
......@@ -20,7 +20,7 @@
<junit.version>4.13</junit.version>
<minio.version>8.2.1</minio.version>
<prettytime-nlp.version>4.0.6.Final</prettytime-nlp.version>
<!-- see https://github.com/rest-assured/rest-assured/issues/1436--><!-- see https://github.com/rest-assured/rest-assured/issues/1436-->
<!-- see https://github.com/rest-assured/rest-assured/issues/1436--><!-- see https://github.com/rest-assured/rest-assured/issues/1436--><!-- see https://github.com/rest-assured/rest-assured/issues/1436--><!-- see https://github.com/rest-assured/rest-assured/issues/1436-->
<groovy.version>3.0.7</groovy.version>
</properties>
<dependencies>
......@@ -115,6 +115,15 @@
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
......
......@@ -5,6 +5,7 @@ import lombok.RequiredArgsConstructor;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.jdbc.core.JdbcTemplate;
import java.io.IOException;
......@@ -13,8 +14,15 @@ public class CucumberHooks {
private final RestHighLevelClient esClient;
private final JdbcTemplate jdbcTemplate;
@Before
public void emptyIndices() throws IOException {
esClient.indices().delete(new DeleteIndexRequest("*"), RequestOptions.DEFAULT);
}
@Before
public void emptyTables() {
jdbcTemplate.execute("truncate table exposed_visits, cluster_periods, stat_location, stat_reports;");
}
}
......@@ -16,3 +16,8 @@ spring:
username: elastic
password: password
uris: http://localhost:9200
datasource:
driverClassName: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/cleadb
username: username
password: password
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment