Skip to content

Commit 7fff1c1

Browse files
committed
remove noise
1 parent ae00d3a commit 7fff1c1

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

DynamoDbEncryption/dafny/DynamoDbEncryption/test/BeaconTestFixtures.dfy

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,6 @@ module BeaconTestFixtures {
265265
return SI.KeySource(client, version.keyStore, SI.LiteralLoc(keys), cache, 0);
266266
}
267267

268-
datatype KeyLocation =
269-
| LiteralLoc (keys: HmacKeyMap)
270-
| SingleLoc (keyId: string)
271-
| MultiLoc (keyName : string, deleteKey : bool)
272-
273268
method GetMultiSource(keyName : string, version : BeaconVersion) returns (output : SI.KeySource)
274269
requires version.keyStore.ValidState()
275270
ensures output.ValidState()

DynamoDbEncryption/dafny/DynamoDbEncryption/test/DDBSupport.dfy

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module TestDDBSupport {
5252
);
5353
var result :- expect QueryInputForBeacons(Some(search), FullTableConfig.attributeActionsOnEncrypt, queryInput);
5454

55+
// Verify Success with branch key id plus beacon
5556
expressionAttributeValues := map[
5657
":value" := DS("0ad21413-51aa-42e1-9c3d-6a4b1edf7e10"),
5758
":other" := DS("junk")
@@ -63,6 +64,7 @@ module TestDDBSupport {
6364
);
6465
result :- expect QueryInputForBeacons(Some(search), FullTableConfig.attributeActionsOnEncrypt, queryInput);
6566

67+
// Verify Failure with beacon but no branch key id
6668
queryInput := DDB.QueryInput (
6769
TableName := "foo",
6870
ExpressionAttributeValues := Some(expressionAttributeValues),
@@ -72,6 +74,7 @@ module TestDDBSupport {
7274
expect result2 == Failure(AwsCryptographyDbEncryptionSdkDynamoDbTypes.Error.DynamoDbEncryptionException(
7375
message := "Need KeyId because of beacon std2 but no KeyId found in query"));
7476

77+
// Verify Success, even when field names are indirect via ExpressionAttributeNames
7578
var expressionAttributeNames := map[
7679
"#beacon" := "std2",
7780
"#keyfield" := "TheKeyField"
@@ -85,16 +88,3 @@ module TestDDBSupport {
8588
result :- expect QueryInputForBeacons(Some(search), FullTableConfig.attributeActionsOnEncrypt, queryInput);
8689
}
8790
}
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

Comments
 (0)