File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
kotlin/services/secrets-manager Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ dependencies {
3535 implementation(" com.google.code.gson:gson:2.10" )
3636 testImplementation(" org.junit.jupiter:junit-jupiter:5.9.2" )
3737 implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" )
38+ implementation(" org.slf4j:slf4j-api:2.0.15" )
39+ implementation(" org.slf4j:slf4j-simple:2.0.15" )
3840}
3941
4042tasks.withType<KotlinCompile > {
Original file line number Diff line number Diff line change @@ -7,17 +7,20 @@ import org.junit.jupiter.api.Order
77import org.junit.jupiter.api.Test
88import org.junit.jupiter.api.TestInstance
99import org.junit.jupiter.api.TestMethodOrder
10+ import org.slf4j.Logger
11+ import org.slf4j.LoggerFactory
1012
1113@TestInstance(TestInstance .Lifecycle .PER_CLASS )
1214@TestMethodOrder(OrderAnnotation ::class )
1315class SecretsManagerKotlinTest {
16+ private val logger: Logger = LoggerFactory .getLogger(APIGatewayTest ::class .java)
1417 private var secretName = " mysecret"
1518
1619 @Test
1720 @Order(1 )
1821 fun getSecretValue () =
1922 runBlocking {
2023 getValue(secretName)
21- println (" Test 1 passed" )
24+ logger.info (" Test 1 passed" )
2225 }
2326}
Original file line number Diff line number Diff line change 1+ <configuration >
2+ <appender name =" STDOUT" class =" ch.qos.logback.core.ConsoleAppender" >
3+ <encoder >
4+ <pattern >%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern >
5+ </encoder >
6+ </appender >
7+
8+ <root level =" info" >
9+ <appender-ref ref =" STDOUT" />
10+ </root >
11+ </configuration >
You can’t perform that action at this time.
0 commit comments