Skip to content

Commit

Permalink
PYIC-7797: process candidate identity lambda (#2770)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe-Edwards-GDS authored Jan 9, 2025
2 parents 0c7fdc6 + 08faad3 commit 14c3c48
Show file tree
Hide file tree
Showing 50 changed files with 2,455 additions and 29 deletions.
10 changes: 2 additions & 8 deletions lambdas/call-ticf-cri/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ dependencies {
project(":libs:common-services"),
project(":libs:cri-storing-service"),
project(":libs:user-identity-service"),
project(":libs:verifiable-credentials")
project(":libs:verifiable-credentials"),
project(":libs:ticf-cri-service")

testImplementation libs.hamcrest,
libs.junitJupiter,
libs.mockitoJunit,
libs.pactConsumerJunit,
project(path: ':libs:common-services', configuration: 'tests'),
project(path: ':libs:test-helpers')

Expand All @@ -37,12 +37,6 @@ test {
exclude 'uk/gov/di/ipv/core/callticfcri/pact/**'
}

task pactConsumerTests (type: Test) {
useJUnitPlatform()
include 'uk/gov/di/ipv/core/callticfcri/pact/**'
systemProperties['pact.rootDir'] = "$rootDir/build/pacts"
}

jacocoTestReport {
dependsOn test
reports {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import software.amazon.lambda.powertools.logging.Logging;
import software.amazon.lambda.powertools.metrics.Metrics;
import software.amazon.lambda.powertools.tracing.Tracing;
import uk.gov.di.ipv.core.callticfcri.exception.TicfCriServiceException;
import uk.gov.di.ipv.core.callticfcri.service.TicfCriService;
import uk.gov.di.ipv.core.library.annotations.ExcludeFromGeneratedCoverageReport;
import uk.gov.di.ipv.core.library.cimit.exception.CiPostMitigationsException;
import uk.gov.di.ipv.core.library.cimit.exception.CiPutException;
Expand All @@ -33,6 +31,8 @@
import uk.gov.di.ipv.core.library.service.ClientOAuthSessionDetailsService;
import uk.gov.di.ipv.core.library.service.ConfigService;
import uk.gov.di.ipv.core.library.service.IpvSessionService;
import uk.gov.di.ipv.core.library.ticf.TicfCriService;
import uk.gov.di.ipv.core.library.ticf.exception.TicfCriServiceException;
import uk.gov.di.ipv.core.library.verifiablecredential.service.SessionCredentialsService;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import org.mockito.Mock;
import org.mockito.Spy;
import org.mockito.junit.jupiter.MockitoExtension;
import uk.gov.di.ipv.core.callticfcri.exception.TicfCriServiceException;
import uk.gov.di.ipv.core.callticfcri.service.TicfCriService;
import uk.gov.di.ipv.core.library.cimit.exception.CiPostMitigationsException;
import uk.gov.di.ipv.core.library.cimit.exception.CiPutException;
import uk.gov.di.ipv.core.library.cimit.exception.CiRetrievalException;
Expand All @@ -33,6 +31,8 @@
import uk.gov.di.ipv.core.library.service.ConfigService;
import uk.gov.di.ipv.core.library.service.IpvSessionService;
import uk.gov.di.ipv.core.library.testhelpers.unit.LogCollector;
import uk.gov.di.ipv.core.library.ticf.TicfCriService;
import uk.gov.di.ipv.core.library.ticf.exception.TicfCriServiceException;

import java.util.List;
import java.util.Map;
Expand Down
46 changes: 46 additions & 0 deletions lambdas/process-candidate-identity/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
plugins {
id "java"
id "idea"
id "jacoco"
alias libs.plugins.postCompileWeaving
}

dependencies {
implementation libs.bundles.awsLambda,
project(":libs:common-services"),
project(":libs:audit-service"),
project(":libs:gpg45-evaluator"),
project(":libs:verifiable-credentials"),
project(":libs:user-identity-service"),
project(":libs:cimit-service"),
project(":libs:cri-storing-service"),
project(":libs:evcs-service"),
project(":libs:ticf-cri-service")

testImplementation libs.hamcrest,
libs.junitJupiter,
libs.mockitoJunit,
project(path: ':libs:common-services', configuration: 'tests'),
project(path: ':libs:test-helpers')

testRuntimeOnly(libs.junitPlatform)
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

test {
// Configures environment variable to avoid initialization of AWS X-Ray segments for each tests
environment "LAMBDA_TASK_ROOT", "handler"
useJUnitPlatform ()
finalizedBy jacocoTestReport
}

jacocoTestReport {
dependsOn test
reports {
xml.required.set(true)
}
}
Loading

0 comments on commit 14c3c48

Please sign in to comment.