Skip to content

Commit 93af3cc

Browse files
WithoutConditionExpressionCase
1 parent cda4f5e commit 93af3cc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

TestVectors/dafny/DDBEncryption/src/TestVectors.dfy

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,16 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
925925
expect deleteResult.Failure?, "DeleteItem should have failed.";
926926
expect deleteResult.error.ConditionalCheckFailedException?, "DeleteItem should have failed with ConditionalCheckFailedException";
927927
}
928+
929+
var deleteInputWithoutConditionExpression := DDB.DeleteItemInput(
930+
TableName := TableName,
931+
Key := map[HashName := records[i].item[HashName]],
932+
ReturnValues := Some(DDB.ReturnValue.ALL_OLD)
933+
);
934+
var deleteResultForWithoutConditionExpressionCase := wClient.DeleteItem(deleteInputWithoutConditionExpression);
935+
expect deleteResultForWithoutConditionExpressionCase.Success?, "DeleteItem should have failed.";
936+
expect deleteResultForWithoutConditionExpressionCase.value.Attributes.Some?, "DeleteItemOutput should have had some attribute because ReturnValues was set as `ALL_OLD` in DeleteItemInput";
937+
expect deleteResultForWithoutConditionExpressionCase.value.Attributes.value == records[i].item, "Wrong item was deleted.";
928938
}
929939
}
930940

0 commit comments

Comments
 (0)