Skip to content

Commit 093085b

Browse files
fix error substring check
1 parent 711dac5 commit 093085b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

TestVectors/dafny/DDBEncryption/src/TestVectors.dfy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
918918
// but AWS SDK wraps it into its own type for which customers should be unwrapping.
919919
// In test vectors, we still have to change the error from AWS SDK to dafny so it turns out to be OpaqueWithText.
920920
expect resultForWriteTransaction.error.OpaqueWithText?, "Error should have been of type OpaqueWithText";
921-
var hasDynamoDbEncryptionTransformsExceptionForWriteTransaction? := String.HasSubString(resultForWriteTransaction.error.objMessage, "ExecuteStatement not Supported on encrypted tables.");
921+
var hasDynamoDbEncryptionTransformsExceptionForWriteTransaction? := String.HasSubString(resultForWriteTransaction.error.objMessage, "ExecuteTransaction not Supported on encrypted tables.");
922922
expect hasDynamoDbEncryptionTransformsExceptionForWriteTransaction?.Some?;
923923

924924
// Test with read client
@@ -928,7 +928,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
928928
// but AWS SDK wraps it into its own type for which customers should be unwrapping.
929929
// In test vectors, we still have to change the error from AWS SDK to dafny so it turns out to be OpaqueWithText.
930930
expect resultForReadTransaction.error.OpaqueWithText?, "Error should have been of type OpaqueWithText";
931-
var hasDynamoDbEncryptionTransformsExceptionForReadTransaction? := String.HasSubString(resultForReadTransaction.error.objMessage, "ExecuteStatement not Supported on encrypted tables.");
931+
var hasDynamoDbEncryptionTransformsExceptionForReadTransaction? := String.HasSubString(resultForReadTransaction.error.objMessage, "ExecuteTransaction not Supported on encrypted tables.");
932932
expect hasDynamoDbEncryptionTransformsExceptionForReadTransaction?.Some?;
933933
}
934934

@@ -968,7 +968,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
968968
// but AWS SDK wraps it into its own type for which customers should be unwrapping.
969969
// In test vectors, we still have to change the error from AWS SDK to dafny so it turns out to be OpaqueWithText.
970970
expect resultForBatchInsert.error.OpaqueWithText?, "Error should have been of type OpaqueWithText";
971-
var hasDynamoDbEncryptionTransformsExceptionForBatchInsert? := String.HasSubString(resultForBatchInsert.error.objMessage, "ExecuteStatement not Supported on encrypted tables.");
971+
var hasDynamoDbEncryptionTransformsExceptionForBatchInsert? := String.HasSubString(resultForBatchInsert.error.objMessage, "BatchExecuteStatement not Supported on encrypted tables.");
972972
expect hasDynamoDbEncryptionTransformsExceptionForBatchInsert?.Some?;
973973

974974
// Test with read client for batch select
@@ -983,7 +983,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
983983
// but AWS SDK wraps it into its own type for which customers should be unwrapping.
984984
// In test vectors, we still have to change the error from AWS SDK to dafny so it turns out to be OpaqueWithText.
985985
expect resultForBatchSelect.error.OpaqueWithText?, "Error should have been of type OpaqueWithText";
986-
var hasDynamoDbEncryptionTransformsExceptionForBatchSelect? := String.HasSubString(resultForBatchSelect.error.objMessage, "ExecuteStatement not Supported on encrypted tables.");
986+
var hasDynamoDbEncryptionTransformsExceptionForBatchSelect? := String.HasSubString(resultForBatchSelect.error.objMessage, "BatchExecuteStatement not Supported on encrypted tables.");
987987
expect hasDynamoDbEncryptionTransformsExceptionForBatchSelect?.Some?;
988988

989989
// Test with mixed batch (both inserts and selects)
@@ -998,7 +998,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
998998
// but AWS SDK wraps it into its own type for which customers should be unwrapping.
999999
// In test vectors, we still have to change the error from AWS SDK to dafny so it turns out to be OpaqueWithText.
10001000
expect resultForMixedBatch.error.OpaqueWithText?, "Error should have been of type OpaqueWithText";
1001-
var hasDynamoDbEncryptionTransformsExceptionForMixedBatch? := String.HasSubString(resultForMixedBatch.error.objMessage, "ExecuteStatement not Supported on encrypted tables.");
1001+
var hasDynamoDbEncryptionTransformsExceptionForMixedBatch? := String.HasSubString(resultForMixedBatch.error.objMessage, "BatchExecuteStatement not Supported on encrypted tables.");
10021002
expect hasDynamoDbEncryptionTransformsExceptionForMixedBatch?.Some?;
10031003
}
10041004

0 commit comments

Comments
 (0)