File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed
apigateway/src/test/kotlin Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 11// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22// SPDX-License-Identifier: Apache-2.0
33
4+ import java.util.Random
5+
46import aws.sdk.kotlin.services.apigateway.ApiGatewayClient
57import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
68import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
9+
710import com.google.gson.Gson
11+
812import com.kotlin.gateway.createAPI
913import com.kotlin.gateway.deleteAPI
1014import com.kotlin.gateway.getAllDeployments
1115import com.kotlin.gateway.getAllStages
16+
1217import kotlinx.coroutines.runBlocking
18+
1319import org.junit.jupiter.api.BeforeAll
1420import org.junit.jupiter.api.DisplayName
1521import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
@@ -18,7 +24,7 @@ import org.junit.jupiter.api.Order
1824import org.junit.jupiter.api.Test
1925import org.junit.jupiter.api.TestInstance
2026import org.junit.jupiter.api.TestMethodOrder
21- import java.util.Random
27+
2228import org.slf4j.Logger
2329import org.slf4j.LoggerFactory
2430
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ dependencies {
3838 implementation(" com.googlecode.json-simple:json-simple:1.1.1" )
3939 testImplementation(" org.junit.jupiter:junit-jupiter:5.9.2" )
4040 implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" )
41+ implementation(" org.slf4j:slf4j-api:2.0.15" )
42+ implementation(" org.slf4j:slf4j-simple:2.0.15" )
4143}
4244tasks.withType<KotlinCompile > {
4345 kotlinOptions.jvmTarget = " 17"
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import org.junit.jupiter.api.Order
2121import org.junit.jupiter.api.Test
2222import org.junit.jupiter.api.TestInstance
2323import org.junit.jupiter.api.TestMethodOrder
24+ import org.slf4j.Logger
25+ import org.slf4j.LoggerFactory
2426
2527@TestInstance(TestInstance .Lifecycle .PER_CLASS )
2628@TestMethodOrder(OrderAnnotation ::class )
@@ -42,17 +44,6 @@ class AppSyncTest {
4244 dsName = values.dsName.toString()
4345 dsRole = values.dsRole.toString()
4446 tableName = values.tableName.toString()
45-
46- // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
47- /*
48- val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
49- val prop = Properties()
50- prop.load(input)
51- apiId = prop.getProperty("apiId")
52- dsName = prop.getProperty("dsName")
53- dsRole = prop.getProperty("dsRole")
54- tableName = prop.getProperty("tableName")
55- */
5647 }
5748
5849 @Test
You can’t perform that action at this time.
0 commit comments