Skip to content

Commit

Permalink
[DBCluster] add missing port in case of RestoreDbClusterToPointInTime…
Browse files Browse the repository at this point in the history
…Request
  • Loading branch information
moataz-mhmd committed Oct 13, 2023
1 parent 8c1d2c2 commit 6683dfb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ static RestoreDbClusterToPointInTimeRequest restoreDbClusterToPointInTimeRequest
.iops(model.getIops())
.kmsKeyId(model.getKmsKeyId())
.networkType(model.getNetworkType())
.port(model.getPort())
.publiclyAccessible(model.getPubliclyAccessible())
.scalingConfiguration(translateScalingConfigurationToSdk(model.getScalingConfiguration()))
.serverlessV2ScalingConfiguration(translateServerlessV2ScalingConfiguration(model.getServerlessV2ScalingConfiguration()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,19 @@ public void restoreDBClusterFromSnapshotServerlessV2() {
assertThat(modifyRequest.serverlessV2ScalingConfiguration()).isNull();
}

@Test
public void restoreDBClusterToPointInTimePort() {
final ResourceModel model = ResourceModel.builder()
.engineMode(EngineMode.Provisioned.toString())
.enableIAMDatabaseAuthentication(true)
.useLatestRestorableTime(true)
.port(1155)
.build();
final RestoreDbClusterToPointInTimeRequest request = Translator.restoreDbClusterToPointInTimeRequest(model, Tagging.TagSet.emptySet());

assertThat(request.port()).isEqualTo(1155);
}

@Test
public void translateDbClusterFromSdk_setDefaultStorageType() {
final ResourceModel model = Translator.translateDbClusterFromSdk(
Expand Down

0 comments on commit 6683dfb

Please sign in to comment.