Skip to content

Commit 9353e17

Browse files
auto commit
1 parent 7210baf commit 9353e17

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

TestVectors/dafny/DDBEncryption/src/TestVectors.dfy

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -846,12 +846,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
846846

847847
// Update each record by appending "-updated" to the partition key
848848
for i := 0 to |records| {
849-
// Get the current value of the partition key
850-
var currentValue;
851-
currentValue := records[i].item[HashName].N;
852-
853-
// Append "-updated" to the current value
854-
var newValue := currentValue + "-updated";
849+
var newValue := "updated";
855850

856851
// Create an update expression to update the partition key
857852
var updateExpr := "SET #pk = :val";
@@ -885,18 +880,18 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
885880
method BasicIoTestDeleteItem(writeConfig : TableConfig, readConfig : TableConfig, records : seq<Record>)
886881
{
887882
var wClient :- expect newGazelle(writeConfig);
883+
print(writeConfig.config.attributeActionsOnEncrypt);
888884
var rClient :- expect newGazelle(readConfig);
889885
DeleteTable(wClient);
890886
WriteAllRecords(wClient, records);
891887

892888
// Try to delete records with a condition expression with condition to
893-
// delete records if the record has an attribute "randomAttribute" with value "random"
894-
// These are random attribute and value because we conditional expression should fail before going into dynamodb.
889+
// delete records if the record has an attribute "Two" with value "Dos"
895890
for i := 0 to |records| {
896-
// Set up condition expression to only delete if randomAttribute = "random"
891+
// Set up condition expression to only delete if Two = "Dos"
897892
var conditionExpr := "#attr = :val";
898-
var exprAttrNames := map["#attr" := "randomAttribute"];
899-
var exprAttrValues := map[":val" := DDB.AttributeValue.S("random")];
893+
var exprAttrNames := map["#attr" := "Two"];
894+
var exprAttrValues := map[":val" := DDB.AttributeValue.S("Dos")];
900895

901896
var deleteInput := DDB.DeleteItemInput(
902897
TableName := TableName,

0 commit comments

Comments
 (0)