Skip to content

Commit

Permalink
Merge pull request #69 from ministryofjustice/LCAM-1034
Browse files Browse the repository at this point in the history
LCAM-1034
  • Loading branch information
skasthuri36326 authored Nov 29, 2023
2 parents ce09c06 + 5503758 commit 4181c84
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
3 changes: 1 addition & 2 deletions crime-evidence/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ def versions = [
mockwebserverVersion : "4.10.0",
pitest : "1.4.10",
commonsLang3Version : "3.10",
crimeCommonsVersion : "2.7.0",
crimeCommonsVersion : "2.8.0",
wiremockVersion : "2.35.0",
springDocWebMVCVersion : "2.1.0"

]

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Slf4j
@SpringBootApplication(exclude = ZipkinAutoConfiguration.class)
@SpringBootApplication
@ConfigurationPropertiesScan
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class CrimeEvidenceApplication {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.security.oauth2.jwt.Jwt;
import org.springframework.security.oauth2.jwt.JwtDecoder;

import java.time.Instant;
import java.util.Map;

@TestConfiguration
@ComponentScan(basePackages = {"uk.gov.justice.laa.crime.commons.tracing"})
public class CrimeEvidenceTestConfiguration {

static final String SUB = "sub";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import uk.gov.justice.laa.crime.commons.tracing.TraceIdHandler;
import uk.gov.justice.laa.crime.evidence.CrimeEvidenceApplication;
import uk.gov.justice.laa.crime.evidence.config.CrimeEvidenceTestConfiguration;
import uk.gov.justice.laa.crime.evidence.data.builder.TestModelDataBuilder;
Expand Down Expand Up @@ -52,6 +53,9 @@ class CrimeEvidenceControllerTest {
@MockBean
private EvidenceService evidenceService;

@MockBean
private TraceIdHandler traceIdHandler;

@BeforeEach
public void setup() {
this.mvc = MockMvcBuilders.webAppContextSetup(this.webApplicationContext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.github.tomakehurst.wiremock.client.WireMock;
import org.junit.jupiter.api.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Import;
import org.springframework.http.HttpMethod;
Expand Down Expand Up @@ -33,6 +34,7 @@
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@Import(CrimeEvidenceTestConfiguration.class)
@SpringBootTest(classes = CrimeEvidenceApplication.class, webEnvironment = DEFINED_PORT)
@AutoConfigureObservability
class CrimeEvidenceIntegrationTest {

private static final String CCP_ENDPOINT_URL = "/api/internal/v1/evidence";
Expand Down

0 comments on commit 4181c84

Please sign in to comment.