Skip to content

Commit

Permalink
feat : upgrade postgres to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Dec 5, 2024
1 parent 439046b commit b659fcd
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 19 deletions.
2 changes: 1 addition & 1 deletion boot-api-archunit-sample/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.8'
services:

postgresqldb:
image: postgres:16.6-alpine
image: postgres:17.2-alpine
environment:
- POSTGRES_USER=appuser
- POSTGRES_PASSWORD=secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

@SpringBootApplication
@EnableConfigurationProperties({ApplicationProperties.class})
public class Application {
public class ArchUnitApplication {

public static void main(String[] args) {
SpringApplication.run(Application.class, args);
SpringApplication.run(ArchUnitApplication.class, args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
import javax.sql.DataSource;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.context.annotation.Import;

@DataJpaTest(properties = {"spring.jpa.hibernate.ddl-auto=validate", "spring.test.database.replace=none"})
@DataJpaTest(properties = {"spring.jpa.hibernate.ddl-auto=validate"})
@Import(ContainersConfig.class)
@AutoConfigureTestDatabase
class SchemaValidationTest {

@Autowired
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.example.archunit;

import com.example.archunit.common.ContainersConfig;
import org.springframework.boot.SpringApplication;

public class TestArchUnitApplication {

public static void main(String[] args) {
SpringApplication.from(ArchUnitApplication::main)
.with(ContainersConfig.class)
.withAdditionalProfiles("local")
.run(args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public class ContainersConfig {
@Bean
@ServiceConnection
PostgreSQLContainer<?> postgreSQLContainer() {
return new PostgreSQLContainer<>(DockerImageName.parse("postgres").withTag("16.3-alpine"));
return new PostgreSQLContainer<>(DockerImageName.parse("postgres").withTag("17.2-alpine"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.web.servlet.MockMvc;

@WebMvcTest(controllers = ClientController.class)
Expand All @@ -46,7 +46,7 @@ class ClientControllerTest {
@Autowired
private MockMvc mockMvc;

@MockBean
@MockitoBean
private ClientService clientService;

@Autowired
Expand Down

0 comments on commit b659fcd

Please sign in to comment.