You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The delete operation will succeed only if the condition is met
905
906
var deleteResult := wClient.DeleteItem(deleteInput);
906
907
907
-
expect deleteResult.Failure?, "DeleteItem should have failed.";
908
-
// This error is of type DynamoDbEncryptionTransformsException
909
-
// but AWS SDK wraps it into its own type for which customers should be unwrapping.
910
-
// In test vectors, we still have to change the error from AWS SDK to dafny so it turns out to be OpaqueWithText.
911
-
expect deleteResult.error.OpaqueWithText?, "Error should have been of type OpaqueWithText";
912
-
var hasDynamoDbEncryptionTransformsException? := String.HasSubString(deleteResult.error.objMessage, "Condition Expressions forbidden on encrypted attributes");
913
-
expect hasDynamoDbEncryptionTransformsException?.Some?, "Error might is not be of type DynamoDbEncryptionTransformsException";
908
+
expect attributeToDelete in writeConfig.config.attributeActionsOnEncrypt, "`attributeToDelete` not found in attributeActionsOnEncrypt of config.";
909
+
if writeConfig.config.attributeActionsOnEncrypt[attributeToDelete] == SE.ENCRYPT_AND_SIGN {
910
+
expect deleteResult.Failure?, "DeleteItem should have failed.";
911
+
// This error is of type DynamoDbEncryptionTransformsException
912
+
// but AWS SDK wraps it into its own type for which customers should be unwrapping.
913
+
// In test vectors, we still have to change the error from AWS SDK to dafny so it turns out to be OpaqueWithText.
914
+
expect deleteResult.error.OpaqueWithText?, "Error should have been of type OpaqueWithText";
915
+
var hasDynamoDbEncryptionTransformsException? := String.HasSubString(deleteResult.error.objMessage, "Condition Expressions forbidden on encrypted attributes");
916
+
expect hasDynamoDbEncryptionTransformsException?.Some?, "Error might is not be of type DynamoDbEncryptionTransformsException";
0 commit comments