Skip to content

Commit

Permalink
renamed method to createOrUpdateAdditionalDataV2
Browse files Browse the repository at this point in the history
  • Loading branch information
salamonpavel committed May 28, 2024
1 parent 5fd5f88 commit 1513849
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ trait PartitioningController {
partitioningSubmitDTO: PartitioningSubmitDTO
): IO[ErrorResponse, SingleSuccessResponse[AtumContextDTO]]

def createOrUpdateAdditionalData(
def createOrUpdateAdditionalDataV2(
additionalData: AdditionalDataSubmitDTO
): IO[ErrorResponse, SingleSuccessResponse[AdditionalDataSubmitDTO]]
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class PartitioningControllerImpl(partitioningService: PartitioningService)
mapToSingleSuccessResponse(createPartitioningIfNotExistsV1(partitioningSubmitDTO))
}

override def createOrUpdateAdditionalData(
override def createOrUpdateAdditionalDataV2(
additionalData: AdditionalDataSubmitDTO
): IO[ErrorResponse, SingleSuccessResponse[AdditionalDataSubmitDTO]] = {
mapToSingleSuccessResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ trait Routes extends Endpoints with ServerOptions {
createServerEndpoint(createCheckpointEndpointV2, CheckpointController.createCheckpointV2),
createServerEndpoint(createPartitioningEndpointV1, PartitioningController.createPartitioningIfNotExistsV1),
createServerEndpoint(createPartitioningEndpointV2, PartitioningController.createPartitioningIfNotExistsV2),
createServerEndpoint(createOrUpdateAdditionalDataEndpointV2, PartitioningController.createOrUpdateAdditionalData),
createServerEndpoint(createOrUpdateAdditionalDataEndpointV2, PartitioningController.createOrUpdateAdditionalDataV2),
createServerEndpoint(healthEndpoint, (_: Unit) => ZIO.unit)
)
ZHttp4sServerInterpreter[HttpEnv.Env](http4sServerOptions(metricsInterceptorOption)).from(endpoints).toRoutes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ object PartitioningControllerIntegrationTests extends ZIOSpecDefault with TestDa
suite("CreateOrUpdateAdditionalDataSuite")(
test("Returns expected AdditionalDataSubmitDTO") {
for {
result <- PartitioningController.createOrUpdateAdditionalData(additionalDataSubmitDTO1)
result <- PartitioningController.createOrUpdateAdditionalDataV2(additionalDataSubmitDTO1)
expected = SingleSuccessResponse(additionalDataSubmitDTO1, uuid)
actual = result.copy(requestId = uuid)
} yield assert(actual)(equalTo(expected))
},
test("Returns expected InternalServerErrorResponse") {
assertZIO(PartitioningController.createOrUpdateAdditionalData(additionalDataSubmitDTO2).exit)(
assertZIO(PartitioningController.createOrUpdateAdditionalDataV2(additionalDataSubmitDTO2).exit)(
failsWithA[InternalServerErrorResponse]
)
}
Expand Down

0 comments on commit 1513849

Please sign in to comment.