Skip to content

Commit 49b3978

Browse files
committed
m
1 parent 425077e commit 49b3978

File tree

2 files changed

+1072
-1067
lines changed

2 files changed

+1072
-1067
lines changed

TestVectors/dafny/DDBEncryption/src/TestVectors.dfy

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
5252
schemaOnEncrypt : DDB.CreateTableInput,
5353
globalRecords : seq<Record>,
5454
tableEncryptionConfigs : map<ConfigName, TableConfig>,
55+
largeEncryptionConfigs : map<ConfigName, TableConfig>,
5556
queries : seq<SimpleQuery>,
5657
names : DDB.ExpressionAttributeNameMap,
5758
values : DDB.ExpressionAttributeValueMap,
@@ -75,6 +76,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
7576
print "DBE Test Vectors\n";
7677
print |globalRecords|, " records.\n";
7778
print |tableEncryptionConfigs|, " tableEncryptionConfigs.\n";
79+
print |largeEncryptionConfigs|, " largeEncryptionConfigs.\n";
7880
print |queries|, " queries.\n";
7981
print |names|, " names.\n";
8082
print |values|, " values.\n";
@@ -521,8 +523,8 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
521523
if !DoTestConfig(config) {
522524
return;
523525
}
524-
expect config in tableEncryptionConfigs;
525-
var tconfig := tableEncryptionConfigs[config];
526+
expect config in largeEncryptionConfigs;
527+
var tconfig := largeEncryptionConfigs[config];
526528
var configs := Types.DynamoDbTablesEncryptionConfig (
527529
tableEncryptionConfigs := map[TableName := tconfig.config]
528530
);
@@ -1088,7 +1090,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
10881090

10891091
function MakeEmptyTestVector() : TestVectorConfig
10901092
{
1091-
TestVectorConfig(MakeCreateTableInput(), [], map[], [], map[], map[], [], [], [], [], [], [], [], [], [], [])
1093+
TestVectorConfig(MakeCreateTableInput(), [], map[], map[], [], map[], map[], [], [], [], [], [], [], [], [], [], [])
10921094
}
10931095

10941096
method ParseTestVector(data : JSON, prev : TestVectorConfig, keyVectors: KeyVectors.KeyVectorsClient)
@@ -1109,6 +1111,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
11091111
var ioTests : seq<IoTest> := [];
11101112
var gsi : seq<DDB.GlobalSecondaryIndex> := [];
11111113
var tableEncryptionConfigs : map<string, TableConfig> := map[];
1114+
var largeEncryptionConfigs : map<string, TableConfig> := map[];
11121115
var writeTests : seq<WriteTest> := [];
11131116
var roundTripTests : seq<RoundTripTest> := [];
11141117
var decryptTests : seq<DecryptTest> := [];
@@ -1128,6 +1131,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
11281131
case "IoTests" => ioTests :- GetIoTests(data.obj[i].1, keyVectors);
11291132
case "GSI" => gsi :- GetGSIs(data.obj[i].1);
11301133
case "tableEncryptionConfigs" => tableEncryptionConfigs :- GetTableConfigs(data.obj[i].1, keyVectors);
1134+
case "largeEncryptionConfigs" => largeEncryptionConfigs :- GetTableConfigs(data.obj[i].1, keyVectors);
11311135
case "WriteTests" => writeTests :- GetWriteTests(data.obj[i].1, keyVectors);
11321136
case "RoundTripTest" => roundTripTests :- GetRoundTripTests(data.obj[i].1, keyVectors);
11331137
case "DecryptTests" => decryptTests :- GetDecryptTests(data.obj[i].1, keyVectors);
@@ -1143,6 +1147,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
11431147
schemaOnEncrypt := newSchema,
11441148
globalRecords := prev.globalRecords + records,
11451149
tableEncryptionConfigs := prev.tableEncryptionConfigs + tableEncryptionConfigs,
1150+
largeEncryptionConfigs := prev.largeEncryptionConfigs + largeEncryptionConfigs,
11461151
queries := prev.queries + queries,
11471152
failingQueries := prev.failingQueries + failingQueries,
11481153
names := prev.names + names,

0 commit comments

Comments
 (0)