Skip to content

Commit 89e6ede

Browse files
committed
updated the Kotlin SDK build number
1 parent e52edcd commit 89e6ede

File tree

3 files changed

+12
-48
lines changed

3 files changed

+12
-48
lines changed

kotlin/services/redshift/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ repositories {
2727
}
2828
apply(plugin = "org.jlleitschuh.gradle.ktlint")
2929
dependencies {
30-
implementation("aws.sdk.kotlin:redshift:1.2.28")
31-
implementation("aws.sdk.kotlin:secretsmanager:1.2.28")
30+
implementation("aws.sdk.kotlin:redshift:1.3.112")
31+
implementation("aws.sdk.kotlin:secretsmanager:1.3.112")
3232
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
3333
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
3434
implementation("com.google.code.gson:gson:2.10.1")

kotlin/services/redshift/src/main/kotlin/com/kotlin/redshift/CreateAndModifyCluster.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ suspend fun createCluster(
6262
val clusterRequest =
6363
CreateClusterRequest {
6464
clusterIdentifier = clusterId
65+
publiclyAccessible = true
66+
availabilityZone = "us-east-1a"
6567
masterUsername = masterUsernameVal
6668
masterUserPassword = masterUserPasswordVal
6769
nodeType = "ra3.4xlarge"

kotlin/services/redshift/src/test/kotlin/RedshiftKotlinTest.kt

Lines changed: 8 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ import java.util.Random
3131
class RedshiftKotlinTest {
3232
private var clusterId = ""
3333
private var eventSourceType = ""
34-
private var secretName = ""
34+
private var username = ""
35+
private var password = ""
3536

3637
@BeforeAll
3738
fun setup() =
@@ -44,7 +45,8 @@ class RedshiftKotlinTest {
4445
val json: String = getSecretValues().toString()
4546
val values = gson.fromJson(json, SecretValues::class.java)
4647
clusterId = values.clusterId + randomNum
47-
secretName = values.secretName.toString()
48+
username = values.userName.toString()
49+
password = values.password.toString()
4850
eventSourceType = values.eventSourceType.toString()
4951

5052
// Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
@@ -62,67 +64,26 @@ class RedshiftKotlinTest {
6264
@Order(1)
6365
fun createClusterTest() =
6466
runBlocking {
65-
val gson = Gson()
66-
val user =
67-
gson.fromJson(
68-
com.kotlin.redshift
69-
.getSecretValues(secretName)
70-
.toString(),
71-
User::class.java,
72-
)
73-
val username = user.username
74-
val userPassword = user.password
75-
createCluster(clusterId, username, userPassword)
67+
createCluster(clusterId, username, password)
7668
println("Test 2 passed")
7769
}
7870

7971
@Test
8072
@Order(2)
81-
fun waitForClusterReadyTest() =
82-
runBlocking {
83-
waitForClusterReady(clusterId)
84-
println("Test 3 passed")
85-
}
86-
87-
@Test
88-
@Order(3)
89-
fun modifyClusterReadyTest() =
90-
runBlocking {
91-
modifyCluster(clusterId)
92-
println("Test 4 passed")
93-
}
94-
95-
@Test
96-
@Order(4)
9773
fun describeClustersTest() =
9874
runBlocking {
9975
describeRedshiftClusters()
10076
println("Test 5 passed")
10177
}
10278

10379
@Test
104-
@Order(5)
80+
@Order(3)
10581
fun findReservedNodeOfferTest() =
10682
runBlocking {
10783
findReservedNodeOffer()
10884
println("Test 6 passed")
10985
}
11086

111-
@Test
112-
@Order(6)
113-
fun listEventsTest() =
114-
runBlocking {
115-
listRedShiftEvents(clusterId, eventSourceType)
116-
println("Test 7 passed")
117-
}
118-
119-
@Test
120-
@Order(7)
121-
fun deleteClusterTest() =
122-
runBlocking {
123-
deleteRedshiftCluster(clusterId)
124-
println("Test 8 passed")
125-
}
12687

12788
suspend fun getSecretValues(): String? {
12889
val secretName = "test/red"
@@ -142,6 +103,7 @@ class RedshiftKotlinTest {
142103
internal inner class SecretValues {
143104
val clusterId: String? = null
144105
val eventSourceType: String? = null
145-
val secretName: String? = null
106+
val userName: String? = null
107+
val password: String? = null
146108
}
147109
}

0 commit comments

Comments
 (0)