File tree Expand file tree Collapse file tree
java/edu/eci/cvds/prometeo Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package edu .eci .cvds .prometeo ;
22
33import org .junit .jupiter .api .Test ;
4- import org .springframework .boot .test .autoconfigure .web .servlet .WebMvcTest ;
54import 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" )
119class PrometeoApplicationTests {
1210
13- @ Test
14- void contextLoads () {
15- }
16-
17- }
11+ @ Test
12+ void contextLoads () {
13+ }
14+ }
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments