From 8cae1fe724674dc5913d1f9dd2e96d8debff2698 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Wed, 13 Aug 2025 14:43:47 -0700 Subject: [PATCH 1/4] smithy dafny bump test --- submodules/smithy-dafny | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/smithy-dafny b/submodules/smithy-dafny index 97456490a..29228f53e 160000 --- a/submodules/smithy-dafny +++ b/submodules/smithy-dafny @@ -1 +1 @@ -Subproject commit 97456490a31f37c28d2269b26bce4007ca0edf59 +Subproject commit 29228f53e97bc5f89f4a82887b11688a7d8ab6e9 From a8ad40044545d53e533f4ee7de4499d771ddcd1c Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Tue, 19 Aug 2025 10:29:33 -0700 Subject: [PATCH 2/4] auto commit --- ...GetEncryptedDataKeyDescriptionExample.java | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java b/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java index ddc63e469..004a201f5 100644 --- a/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java +++ b/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java @@ -1,21 +1,43 @@ package software.amazon.cryptography.examples; +import java.util.UUID; import org.testng.annotations.Test; public class TestGetEncryptedDataKeyDescriptionExample { @Test public void TestGetEncryptedDataKeyDescription() { + final String partitionKeyValue = "BasicPutGetExample" + UUID.randomUUID(); + final String partitionKeyName = "partition_key"; + final String sortKeyValue = "0"; + final String sortKeyName = "sort_key"; + // `getEncryptedDataKeyDescription` assumes that there is already existing item in dynamodb. + // So, we need to run `PutItemGetItem` before `getEncryptedDataKeyDescription` + BasicPutGetExample.PutItemGetItem( + TestUtils.TEST_KMS_KEY_ID, + TestUtils.TEST_DDB_TABLE_NAME, + partitionKeyName, + sortKeyName, + partitionKeyValue, + sortKeyValue + ); GetEncryptedDataKeyDescriptionExample.getEncryptedDataKeyDescription( TestUtils.TEST_DDB_TABLE_NAME, - "partition_key", - "BasicPutGetExample", - "sort_key", - "0", + partitionKeyName, + partitionKeyValue, + sortKeyName, + sortKeyValue, "aws-kms", TestUtils.TEST_KMS_KEY_ID, null, null ); + TestUtils.cleanUpDDBItem( + TestUtils.TEST_DDB_TABLE_NAME, + partitionKeyName, + sortKeyName, + partitionKeyValue, + sortKeyValue + ); } } From 0195cc2983cd2f6b640400a5aca6ea5a4c4226dc Mon Sep 17 00:00:00 2001 From: Rishav karanjit Date: Tue, 19 Aug 2025 14:01:13 -0700 Subject: [PATCH 3/4] Update Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java Co-authored-by: Kess Plasmeier <76071473+kessplas@users.noreply.github.com> --- .../examples/TestGetEncryptedDataKeyDescriptionExample.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java b/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java index 004a201f5..637768a38 100644 --- a/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java +++ b/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java @@ -7,7 +7,7 @@ public class TestGetEncryptedDataKeyDescriptionExample { @Test public void TestGetEncryptedDataKeyDescription() { - final String partitionKeyValue = "BasicPutGetExample" + UUID.randomUUID(); + final String partitionKeyValue = "GetEncryptedDataKeyDescriptionExample" + UUID.randomUUID(); final String partitionKeyName = "partition_key"; final String sortKeyValue = "0"; final String sortKeyName = "sort_key"; From 35721c6e70b6766f760bae7784e4b26329dbef46 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Tue, 19 Aug 2025 14:59:07 -0700 Subject: [PATCH 4/4] formatting --- .../examples/TestGetEncryptedDataKeyDescriptionExample.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java b/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java index 637768a38..d9a8d287b 100644 --- a/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java +++ b/Examples/runtimes/java/DynamoDbEncryption/src/test/java/software/amazon/cryptography/examples/TestGetEncryptedDataKeyDescriptionExample.java @@ -7,7 +7,8 @@ public class TestGetEncryptedDataKeyDescriptionExample { @Test public void TestGetEncryptedDataKeyDescription() { - final String partitionKeyValue = "GetEncryptedDataKeyDescriptionExample" + UUID.randomUUID(); + final String partitionKeyValue = + "GetEncryptedDataKeyDescriptionExample" + UUID.randomUUID(); final String partitionKeyName = "partition_key"; final String sortKeyValue = "0"; final String sortKeyName = "sort_key";