@@ -812,7 +812,8 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
812
812
var _ :- expect wClient. CreateTable (schemaOnEncrypt);
813
813
814
814
// Create a PartiQL INSERT statement
815
- var insertStatement := CreateInsertStatement (TableName);
815
+ // The dynamodb attributes are random and non-existent because ExecuteStatement is supposed to be failed before going into dynamodb.
816
+ var insertStatement := "INSERT INTO \"" + TableName + "\" VALUE {'partition_key': 'a', 'sort_key': 'b', 'attribute1': 'a'";
816
817
var inputForInsertStatement := DDB. ExecuteStatementInput (
817
818
Statement := insertStatement,
818
819
Parameters := None,
@@ -823,9 +824,11 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
823
824
);
824
825
var resultForInsertStatement := wClient. ExecuteStatement (inputForInsertStatement);
825
826
expect resultForInsertStatement. Failure?;
827
+ print (resultForInsertStatement. error);
826
828
827
829
// Create a PartiQL SELECT statement
828
- var selectStatement := CreateSelectStatement (TableName);
830
+ // The dynamodb attributes are random and non-existent because ExecuteStatement is supposed to be failed before going into dynamodb.
831
+ var selectStatement := "SELECT * FROM" + TableName + "WHERE partition_key = 'a' AND sort_key = 'b'";
829
832
var inputForSelectStatement := DDB. ExecuteStatementInput (
830
833
Statement := selectStatement,
831
834
Parameters := None,
@@ -838,19 +841,6 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
838
841
expect resultForSelectStatement. Failure?;
839
842
}
840
843
841
- function CreateInsertStatement (tableName : string ) : string
842
- {
843
- // Convert DynamoDB item to PartiQL INSERT statement
844
- "INSERT INTO \"" + tableName + "\" VALUE {'partition_key': 'a', 'sort_key': 'b', 'attribute1': 'a'"
845
- }
846
-
847
- function CreateSelectStatement (tableName : string ) : string
848
- {
849
- // Create a SELECT statement to retrieve an item by its hash key
850
- // Example: SELECT * FROM "TableName" WHERE id = 1
851
- "SELECT * FROM" + tableName + "WHERE partition_key = 'a' AND sort_key = 'b'"
852
- }
853
-
854
844
method FindMatchingRecord (expected : DDB .AttributeMap, actual : DDB .ItemList) returns (output : bool )
855
845
{
856
846
var exp := NormalizeItem (expected);
0 commit comments