From 071cf6d8c8b38393e9dde44c15cc7d8f8ae7144a Mon Sep 17 00:00:00 2001 From: Ritvik Kapila Date: Fri, 29 Nov 2024 21:11:30 -0800 Subject: [PATCH] fix tests --- .../dafny/DynamoDbEncryption/test/BeaconTestFixtures.dfy | 8 ++++++-- TestVectors/dafny/DDBEncryption/src/JsonConfig.dfy | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/DynamoDbEncryption/dafny/DynamoDbEncryption/test/BeaconTestFixtures.dfy b/DynamoDbEncryption/dafny/DynamoDbEncryption/test/BeaconTestFixtures.dfy index bbf448e00..1405c04d3 100644 --- a/DynamoDbEncryption/dafny/DynamoDbEncryption/test/BeaconTestFixtures.dfy +++ b/DynamoDbEncryption/dafny/DynamoDbEncryption/test/BeaconTestFixtures.dfy @@ -242,7 +242,9 @@ module BeaconTestFixtures { cache := MPT.Default(Default := MPT.DefaultCache(entryCapacity := 3)) ); var cache :- expect mpl.CreateCryptographicMaterialsCache(input); - return SI.KeySource(client, version.keyStore, SI.LiteralLoc(keys), cache, 0); + // Create a test partitionIdBytes + var partitionIdBytes : seq := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + return SI.KeySource(client, version.keyStore, SI.LiteralLoc(keys), cache, 0, partitionIdBytes); } method GetMultiSource(keyName : string, version : BeaconVersion) returns (output : SI.KeySource) @@ -257,7 +259,9 @@ module BeaconTestFixtures { cache := MPT.Default(Default := MPT.DefaultCache(entryCapacity := 3)) ); var cache :- expect mpl.CreateCryptographicMaterialsCache(input); - return SI.KeySource(client, version.keyStore, SI.MultiLoc(keyName, false), cache, 0); + // Create a test partitionIdBytes + var partitionIdBytes : seq := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + return SI.KeySource(client, version.keyStore, SI.MultiLoc(keyName, false), cache, 0, partitionIdBytes); } const SimpleItem : DDB.AttributeMap := map[ diff --git a/TestVectors/dafny/DDBEncryption/src/JsonConfig.dfy b/TestVectors/dafny/DDBEncryption/src/JsonConfig.dfy index 650e9fd21..6e0a5a211 100644 --- a/TestVectors/dafny/DDBEncryption/src/JsonConfig.dfy +++ b/TestVectors/dafny/DDBEncryption/src/JsonConfig.dfy @@ -524,7 +524,10 @@ module {:options "-functionSyntax:4"} JsonConfig { var cache :- expect mpl.CreateCryptographicMaterialsCache(input); var client :- expect Primitives.AtomicPrimitives(); - var src := SI.KeySource(client, store, SI.SingleLoc("foo"), cache, 100 as uint32); + + // Create a test partitionIdBytes + var partitionIdBytes : seq := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; + var src := SI.KeySource(client, store, SI.SingleLoc("foo"), cache, 100 as uint32, partitionIdBytes); var bv :- expect SI.MakeBeaconVersion(1, src, map[], map[], map[]); return Success(bv);