chore(dafny): Add Update and delete test #1942
Conversation
…ws-database-encryption-sdk-dynamodb into rishav/addUpdateDeleteTest
|
It looks like you are adding or removing the dafny keyword {:only}. |
…ws-database-encryption-sdk-dynamodb into rishav/addUpdateDeleteTest
| ConditionExpression := None | ||
| ); | ||
| var updateResult := wClient.UpdateItem(updateInput); | ||
| if writeConfig.config.attributeActionsOnEncrypt[attributeToUpdate] == SE.ENCRYPT_AND_SIGN || writeConfig.config.attributeActionsOnEncrypt[attributeToUpdate] == SE.SIGN_ONLY { |
There was a problem hiding this comment.
Should we also check for SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT here? I think yes, even if the item under test doesn't have that attribute
There was a problem hiding this comment.
SIGN_AND_INCLUDE_IN_ENCRYPTION_CONTEXT is not here because delete operation is not forbidden on signed attributes. Its only forbidden when the condition attribute contains encrypted attribute. https://github.com/aws/aws-database-encryption-sdk-dynamodb/blob/main/specification/dynamodb-encryption-client/ddb-support.md#testconditionexpression
| var deleteInput := DDB.DeleteItemInput( | ||
| TableName := TableName, | ||
| Key := map[HashName := records[i].item[HashName]], | ||
| ConditionExpression := Some(conditionExpr), |
There was a problem hiding this comment.
If these are meant to be basic smoke tests, I think it's worth adding a case where we don't specify a condition expression at all -- is that feasible/worth testing?
(I think the expected result would be that the delete passes)
Co-authored-by: Lucas McDonald <lucasmcdonald3@gmail.com>
…ws-database-encryption-sdk-dynamodb into rishav/addUpdateDeleteTest
lucasmcdonald3
left a comment
There was a problem hiding this comment.
One error message change, other than that LGTM
Co-authored-by: Lucas McDonald <lucasmcdonald3@gmail.com>
## [3.9.0](v3.8.1...v3.9.0) (2025-06-25) ### Features * **Go:** support DB-ESDK in Go ([#1861](#1861)) ([56821de](56821de)) ### Maintenance * **CI:** Fix Dafny CLI CI error ([#1910](#1910)) ([97fe459](97fe459)) * **dafny:** Add ExecuteStatement test ([#1932](#1932)) ([66a19ab](66a19ab)) * **dafny:** Add Update and delete test ([#1942](#1942)) ([3bd48ba](3bd48ba)) * **dafny:** bump mpl version ([#1933](#1933)) ([0ebc112](0ebc112)) * **dafny:** change nat to uint64 in many places ([#1852](#1852)) ([ec22b7d](ec22b7d)) * **dafny:** further performance enhancements ([#1834](#1834)) ([ea94693](ea94693)) * **dafny:** improve performance ([#1900](#1900)) ([ccf61d6](ccf61d6)) * **dafny:** improve performance of searchable encryption ([#1931](#1931)) ([8b71004](8b71004)) * **dafny:** reduce use of BigInteger ([#1872](#1872)) ([eb7679a](eb7679a)) * **dafny:** test ExecuteTransaction and BatchExecuteStatement ([#1941](#1941)) ([69c37c6](69c37c6)) * **deps:** Bump MPL version to 1.11.0 ([#1945](#1945)) ([efdd373](efdd373)) * **dotnet:** copy all the JSON for testvectors CI ([#1921](#1921)) ([58b39a7](58b39a7)) * fix Java release script ([#1944](#1944)) ([ada96d7](ada96d7)) * further performance improvements ([#1826](#1826)) ([3194054](3194054)) * **go:** add item encryptor and misc examples ([#1873](#1873)) ([45ec157](45ec157)) * **go:** fix restore logic for polymorph copied code ([#1935](#1935)) ([e2d76c3](e2d76c3)) * **go:** Update code generation CI to check Go polymorph code ([#1936](#1936)) ([6e1e48c](6e1e48c)) * improve performance ([#1622](#1622)) ([8ca2883](8ca2883)) * install smithy-dafny dependencies in github workflows ([#1890](#1890)) ([fc64e62](fc64e62)) * **java:** allow local testing ([#1779](#1779)) ([42be20b](42be20b)) * **java:** Parallelize Java Examples ([#1940](#1940)) ([b532564](b532564)) * restore static test branch key id ([#1790](#1790)) ([c67e3c9](c67e3c9)) * run test vectors in net and java on MacOS ([#1844](#1844)) ([10f530b](10f530b)) * **rust:** get latest fixes for dafny-runtime-rust ([#1924](#1924)) ([245ad31](245ad31)) * **rust:** prepare 1.1.1 release ([#1937](#1937)) ([6173888](6173888)) * **rust:** Rust release version 1.1.0 ([#1885](#1885)) ([f2997be](f2997be)) * **rust:** update dafny runtime release ([#1884](#1884)) ([0e4fd02](0e4fd02)) * **TestVectors:** Test Smithy-generated ItemEncryptor ([#1814](#1814)) ([ba9caca](ba9caca)) * update README for missing info ([#1939](#1939)) ([354f4f6](354f4f6))
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.