Skip to content

Commit 6a12913

Browse files
committed
Update test comments
1 parent d46a242 commit 6a12913

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

services/rds/common/src/aws/sdk/kotlin/services/rds/AuthTokenGenerator.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ public class AuthTokenGenerator(
2323
private val generator = AuthTokenGenerator("rds-db", credentials)
2424

2525
/**
26-
* Generates an auth token for the DbConnect action.
26+
* Generates an auth token for the `connect` action.
2727
* @param endpoint the endpoint of the database
2828
* @param region the region of the database
29+
* @param username the username to authenticate with
2930
* @param expiration how long the auth token should be valid for. Defaults to 900.seconds
3031
*/
3132
public suspend fun generateAuthToken(endpoint: Url, region: String, username: String, expiration: Duration = 900.seconds): String {
32-
val dbConnectEndpoint = endpoint.toBuilder().apply {
33+
val endpoint = endpoint.toBuilder().apply {
3334
parameters.apply {
3435
decodedParameters {
3536
add("Action", "connect")
@@ -38,6 +39,6 @@ public class AuthTokenGenerator(
3839
}
3940
}.build()
4041

41-
return generator.generateAuthToken(dbConnectEndpoint, region, expiration)
42+
return generator.generateAuthToken(endpoint, region, expiration)
4243
}
4344
}

services/rds/common/test/AuthTokenGeneratorTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import kotlin.time.Duration.Companion.seconds
1616

1717
class AuthTokenGeneratorTest {
1818
@Test
19-
fun testGenerateDbConnectAuthToken() = runTest {
19+
fun testGenerateAuthToken() = runTest {
2020
val credentials = Credentials("akid", "secret")
2121

2222
val token = AuthTokenGenerator(credentials)

0 commit comments

Comments
 (0)