Skip to content

Commit d86b08d

Browse files
committed
increase test coverage
1 parent 30ca40d commit d86b08d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

services/sqs/e2eTest/src/SqsMd5ChecksumValidationTest.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,14 @@ class SqsMd5ChecksumValidationTest {
4646
when (val response = context.response.getOrNull()) {
4747
is SendMessageResponse -> {
4848
val modifiedResponse = response.copy {
49-
md5OfMessageBody = wrongMd5ofMessageBody
5049
md5OfMessageAttributes = wrongMd5ofMessageAttribute
51-
md5OfMessageSystemAttributes = wrongMd5ofMessageSystemAttribute
5250
}
5351
return Result.success(modifiedResponse)
5452
}
5553
is ReceiveMessageResponse -> {
5654
val modifiedMessages = response.messages?.map { message ->
5755
message.copy {
5856
md5OfBody = wrongMd5ofMessageBody
59-
md5OfMessageAttributes = wrongMd5ofMessageAttribute
6057
}
6158
}
6259

@@ -68,8 +65,6 @@ class SqsMd5ChecksumValidationTest {
6865
is SendMessageBatchResponse -> {
6966
val modifiedEntries = response.successful.map { entry ->
7067
entry.copy {
71-
md5OfMessageBody = wrongMd5ofMessageBody
72-
md5OfMessageAttributes = wrongMd5ofMessageAttribute
7368
md5OfMessageSystemAttributes = wrongMd5ofMessageSystemAttribute
7469
}
7570
}
@@ -147,6 +142,10 @@ class SqsMd5ChecksumValidationTest {
147142
dataType = "String"
148143
stringValue = TEST_MESSAGE_ATTRIBUTES_VALUE
149144
},
145+
TEST_MESSAGE_ATTRIBUTES_NAME to MessageAttributeValue {
146+
dataType = "Binary"
147+
binaryValue = TEST_MESSAGE_ATTRIBUTES_VALUE.toByteArray()
148+
},
150149
)
151150
messageSystemAttributes = mapOf(
152151
MessageSystemAttributeNameForSends.AwsTraceHeader to MessageSystemAttributeValue {

0 commit comments

Comments
 (0)