Skip to content

Commit 8edf604

Browse files
committed
provide static dummy credentials to tests
1 parent 835866a commit 8edf604

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

hll/s3-transfer-manager/common/test/aws/sdk/kotlin/hll/s3transfermanager/BusinessMetricInterceptorTest.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55

66
package aws.sdk.kotlin.hll.s3transfermanager
77

8+
import aws.sdk.kotlin.runtime.auth.credentials.StaticCredentialsProvider
89
import aws.sdk.kotlin.runtime.http.interceptors.businessmetrics.AwsBusinessMetric
910
import aws.sdk.kotlin.services.s3.S3Client
11+
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
12+
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials.Companion.invoke
1013
import aws.smithy.kotlin.runtime.businessmetrics.containsBusinessMetric
1114
import aws.smithy.kotlin.runtime.client.ProtocolResponseInterceptorContext
1215
import aws.smithy.kotlin.runtime.content.ByteStream
@@ -31,6 +34,7 @@ class BusinessMetricInterceptorTest {
3134
region = "us-west-2"
3235
httpClient = TestEngine()
3336
interceptors += testInterceptor
37+
credentialsProvider = StaticCredentialsProvider(Credentials("akid", "secret"))
3438
}.use { s3Client ->
3539
S3TransferManager {
3640
client = s3Client

hll/s3-transfer-manager/common/test/aws/sdk/kotlin/hll/s3transfermanager/TransferInterceptorTest.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55

66
package aws.sdk.kotlin.hll.s3transfermanager
77

8+
import aws.sdk.kotlin.runtime.auth.credentials.StaticCredentialsProvider
89
import aws.sdk.kotlin.services.s3.S3Client
910
import aws.sdk.kotlin.services.s3.model.CompleteMultipartUploadRequest
1011
import aws.sdk.kotlin.services.s3.model.PutObjectRequest
1112
import aws.sdk.kotlin.services.s3.model.PutObjectResponse
13+
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
14+
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials.Companion.invoke
1215
import aws.smithy.kotlin.runtime.content.ByteStream
1316
import aws.smithy.kotlin.runtime.httptest.TestEngine
1417
import kotlinx.coroutines.runBlocking
@@ -22,6 +25,7 @@ class TransferInterceptorTest {
2225
S3Client {
2326
region = "us-west-2"
2427
httpClient = TestEngine()
28+
credentialsProvider = StaticCredentialsProvider(Credentials("akid", "secret"))
2529
}.use { s3Client ->
2630
S3TransferManager {
2731
client = s3Client

0 commit comments

Comments
 (0)