Skip to content

Commit 1efcfb3

Browse files
chore: application.properties in test to fix ci-cd
1 parent ca692c7 commit 1efcfb3

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

src/test/java/edu/eci/cvds/prometeo/PrometeoApplicationTests.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
import org.junit.jupiter.api.Test;
44
import org.springframework.boot.test.context.SpringBootTest;
55
import org.springframework.test.context.ActiveProfiles;
6+
import org.springframework.test.context.TestPropertySource;
67

7-
@SpringBootTest
8+
@SpringBootTest(classes = PrometeoApplication.class)
89
@ActiveProfiles("test")
10+
@TestPropertySource(properties = {
11+
"spring.main.banner-mode=off",
12+
"logging.level.org.springframework=ERROR"
13+
})
914
class PrometeoApplicationTests {
1015

1116
@Test
1217
void contextLoads() {
18+
// Test vacío que sólo verifica que se cargue el contexto
1319
}
1420
}
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
# Test database configuration using H2 in-memory database
1+
# Configuración para pruebas
2+
spring.main.banner-mode=off
3+
spring.jpa.hibernate.ddl-auto=create-drop
4+
5+
# Configuración de H2 en memoria para pruebas
26
spring.datasource.url=jdbc:h2:mem:testdb
37
spring.datasource.username=sa
48
spring.datasource.password=
59
spring.datasource.driver-class-name=org.h2.Driver
610

7-
# JPA configuration for tests
8-
spring.jpa.hibernate.ddl-auto=create-drop
9-
spring.jpa.show-sql=true
10-
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect
11-
12-
# Disable OpenAI for tests
13-
openai.api.key=test-key
14-
openai.api.url=test-url
11+
# Deshabilitar características no necesarias para pruebas
12+
spring.jpa.show-sql=false
13+
spring.jpa.properties.hibernate.format_sql=false
1514

16-
# Server configuration
17-
server.port=8081
15+
# Desactivar seguridad para pruebas si es necesario
16+
spring.security.enabled=false

0 commit comments

Comments
 (0)