Commit 4ae9a816 authored by Simon Reis's avatar Simon Reis
Browse files

SI-158 Update Test / Add lombok.config

parent 7f327a6f
config.stopBubbling = true
lombok.addLombokGeneratedAnnotation = true
\ No newline at end of file
......@@ -35,7 +35,7 @@
<asciidoctorj-pdf-version>1.5.0-alpha.11</asciidoctorj-pdf-version>
<asciidoctorj-version>1.5.4</asciidoctorj-version>
<asciidoctorj-diagram-versions>1.5.4.1</asciidoctorj-diagram-versions>
<jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
<jruby-complete-version>9.0.0.0</jruby-complete-version>
<mapstruct.version>1.2.0.Final</mapstruct.version>
<flyway-core.version>6.0.8</flyway-core.version>
......
package org.eclipse.openk.gridfailureinformation.config;
import lombok.Data;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
......@@ -9,6 +10,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Log4j2
@Configuration
@Data
public class CorsConfig {
@Value("${cors.corsEnabled}")
......
......@@ -86,6 +86,19 @@ email:
port: 3025
---
spring:
profiles: testCors
datasource:
url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1
flyway:
enabled: false
cors:
corsEnabled: true
---
spring:
profiles: devserver
......
package org.eclipse.openk.gridfailureinformation.config;
import org.eclipse.openk.gridfailureinformation.GridFailureInformationApplication;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import static org.junit.jupiter.api.Assertions.assertTrue;
@SpringBootTest(classes = GridFailureInformationApplication.class)
@ActiveProfiles("testCors")
public class CorsConfigTest {
@Autowired CorsConfig corsConfig;
@Test
public void corsEnabledTest(){
assertTrue(corsConfig.isCorsEnabled());
}
}
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