@@ -52,6 +52,7 @@ module TestDDBSupport {
52
52
);
53
53
var result :- expect QueryInputForBeacons (Some(search), FullTableConfig. attributeActionsOnEncrypt, queryInput);
54
54
55
+ // Verify Success with branch key id plus beacon
55
56
expressionAttributeValues := map [
56
57
":value" := DS ("0ad21413-51aa-42e1-9c3d-6a4b1edf7e10"),
57
58
":other" := DS ("junk")
@@ -63,6 +64,7 @@ module TestDDBSupport {
63
64
);
64
65
result :- expect QueryInputForBeacons (Some(search), FullTableConfig. attributeActionsOnEncrypt, queryInput);
65
66
67
+ // Verify Failure with beacon but no branch key id
66
68
queryInput := DDB. QueryInput (
67
69
TableName := "foo",
68
70
ExpressionAttributeValues := Some(expressionAttributeValues),
@@ -72,6 +74,7 @@ module TestDDBSupport {
72
74
expect result2 == Failure (AwsCryptographyDbEncryptionSdkDynamoDbTypes.Error.DynamoDbEncryptionException(
73
75
message := "Need KeyId because of beacon std2 but no KeyId found in query"));
74
76
77
+ // Verify Success, even when field names are indirect via ExpressionAttributeNames
75
78
var expressionAttributeNames := map [
76
79
"#beacon" := "std2",
77
80
"#keyfield" := "TheKeyField"
@@ -85,16 +88,3 @@ module TestDDBSupport {
85
88
result :- expect QueryInputForBeacons (Some(search), FullTableConfig. attributeActionsOnEncrypt, queryInput);
86
89
}
87
90
}
88
- // Map<String, String> expressionAttributesNames = new HashMap<>();
89
- // expressionAttributesNames.put("#compound", "firstNameCompound");
90
-
91
- // Map<String, AttributeValue> expressionAttributeValues = new HashMap<>();
92
- // expressionAttributeValues.put(":value", AttributeValue.builder().s("f1-l.f2-li.f3-lil.f4-lily.s-Placeholder - 3afba703-6345-4a25-b28a-ec22b1b79a35").build());
93
-
94
- // QueryRequest queryRequest = QueryRequest.builder()
95
- // .tableName(tableName)
96
- // .indexName("aws_dbe_b_firstNameCompound-index")
97
- // .keyConditionExpression("#compound = :value")
98
- // .expressionAttributeNames(expressionAttributesNames)
99
- // .expressionAttributeValues(expressionAttributeValues)
100
- // .build();
0 commit comments