Skip to content

Commit 071cf6d

Browse files
committed
fix tests
1 parent b7a6159 commit 071cf6d

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

DynamoDbEncryption/dafny/DynamoDbEncryption/test/BeaconTestFixtures.dfy

+6-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ module BeaconTestFixtures {
242242
cache := MPT.Default(Default := MPT.DefaultCache(entryCapacity := 3))
243243
);
244244
var cache :- expect mpl.CreateCryptographicMaterialsCache(input);
245-
return SI.KeySource(client, version.keyStore, SI.LiteralLoc(keys), cache, 0);
245+
// Create a test partitionIdBytes
246+
var partitionIdBytes : seq<uint8> := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
247+
return SI.KeySource(client, version.keyStore, SI.LiteralLoc(keys), cache, 0, partitionIdBytes);
246248
}
247249

248250
method GetMultiSource(keyName : string, version : BeaconVersion) returns (output : SI.KeySource)
@@ -257,7 +259,9 @@ module BeaconTestFixtures {
257259
cache := MPT.Default(Default := MPT.DefaultCache(entryCapacity := 3))
258260
);
259261
var cache :- expect mpl.CreateCryptographicMaterialsCache(input);
260-
return SI.KeySource(client, version.keyStore, SI.MultiLoc(keyName, false), cache, 0);
262+
// Create a test partitionIdBytes
263+
var partitionIdBytes : seq<uint8> := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
264+
return SI.KeySource(client, version.keyStore, SI.MultiLoc(keyName, false), cache, 0, partitionIdBytes);
261265
}
262266

263267
const SimpleItem : DDB.AttributeMap := map[

TestVectors/dafny/DDBEncryption/src/JsonConfig.dfy

+4-1
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,10 @@ module {:options "-functionSyntax:4"} JsonConfig {
524524
var cache :- expect mpl.CreateCryptographicMaterialsCache(input);
525525

526526
var client :- expect Primitives.AtomicPrimitives();
527-
var src := SI.KeySource(client, store, SI.SingleLoc("foo"), cache, 100 as uint32);
527+
528+
// Create a test partitionIdBytes
529+
var partitionIdBytes : seq<uint8> := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
530+
var src := SI.KeySource(client, store, SI.SingleLoc("foo"), cache, 100 as uint32, partitionIdBytes);
528531

529532
var bv :- expect SI.MakeBeaconVersion(1, src, map[], map[], map[]);
530533
return Success(bv);

0 commit comments

Comments
 (0)