Skip to content

Commit ca692c7

Browse files
chore: update test instance to fix ci-cd
1 parent d48066f commit ca692c7

2 files changed

Lines changed: 24 additions & 10 deletions

File tree

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
package edu.eci.cvds.prometeo;
22

33
import org.junit.jupiter.api.Test;
4-
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
54
import org.springframework.boot.test.context.SpringBootTest;
6-
import org.springframework.boot.test.mock.mockito.MockBean;
5+
import org.springframework.test.context.ActiveProfiles;
76

8-
import jakarta.activation.DataSource;
9-
10-
@WebMvcTest
7+
@SpringBootTest
8+
@ActiveProfiles("test")
119
class PrometeoApplicationTests {
1210

13-
@Test
14-
void contextLoads() {
15-
}
16-
17-
}
11+
@Test
12+
void contextLoads() {
13+
}
14+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Test database configuration using H2 in-memory database
2+
spring.datasource.url=jdbc:h2:mem:testdb
3+
spring.datasource.username=sa
4+
spring.datasource.password=
5+
spring.datasource.driver-class-name=org.h2.Driver
6+
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
15+
16+
# Server configuration
17+
server.port=8081

0 commit comments

Comments
 (0)