Skip to content

Commit 68e9659

Browse files
author
Lucas McDonald
committed
m
1 parent 2475cd7 commit 68e9659

File tree

3 files changed

+42
-43
lines changed

3 files changed

+42
-43
lines changed

TestVectors/dafny/DDBEncryption/src/TestVectors.dfy

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -74,46 +74,46 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
7474
modifies keyVectors.Modifies
7575
ensures keyVectors.ValidState()
7676
{
77-
// print "DBE Test Vectors\n";
78-
// print |globalRecords|, " records.\n";
79-
// print |tableEncryptionConfigs|, " tableEncryptionConfigs.\n";
80-
// print |largeEncryptionConfigs|, " largeEncryptionConfigs.\n";
81-
// print |queries|, " queries.\n";
82-
// print |names|, " names.\n";
83-
// print |values|, " values.\n";
84-
// print |failingQueries|, " failingQueries.\n";
85-
// print |complexTests|, " complexTests.\n";
86-
// print |ioTests|, " ioTests.\n";
87-
// print |configsForIoTest|, " configsForIoTest.\n";
88-
// print |configsForModTest|, " configsForModTest.\n";
89-
// print |strings|, " strings.\n";
90-
// print |large|, " large.\n";
91-
// if |roundTripTests| != 0 {
92-
// print |roundTripTests[0].configs|, " configs and ", |roundTripTests[0].records|, " records for round trip.\n";
93-
// }
94-
// if |roundTripTests| > 1 {
95-
// print |roundTripTests[1].configs|, " configs and ", |roundTripTests[1].records|, " records for round trip.\n";
96-
// }
97-
98-
// var _ :- expect DecryptManifest.Decrypt("decrypt_dotnet_32.json", keyVectors);
99-
// var _ :- expect DecryptManifest.Decrypt("decrypt_java_32.json", keyVectors);
100-
// var _ :- expect DecryptManifest.Decrypt("decrypt_dotnet_33.json", keyVectors);
101-
// var _ :- expect DecryptManifest.Decrypt("decrypt_java_33.json", keyVectors);
102-
// var _ :- expect DecryptManifest.Decrypt("decrypt_dotnet_33a.json", keyVectors);
103-
// var _ :- expect DecryptManifest.Decrypt("decrypt_java_33a.json", keyVectors);
104-
// var _ :- expect DecryptManifest.Decrypt("decrypt_rust_38.json", keyVectors);
105-
// var _ :- expect WriteManifest.Write("encrypt.json");
106-
// var _ :- expect EncryptManifest.Encrypt("encrypt.json", "decrypt.json", "java", "3.3", keyVectors);
107-
// var _ :- expect DecryptManifest.Decrypt("decrypt.json", keyVectors);
108-
// if |globalRecords| + |tableEncryptionConfigs| + |queries| == 0 {
109-
// print "\nRunning no tests\n";
110-
// return;
111-
// }
112-
// Validate();
113-
// StringOrdering();
114-
// LargeTests();
115-
// BasicIoTest();
116-
// RunIoTests();
77+
print "DBE Test Vectors\n";
78+
print |globalRecords|, " records.\n";
79+
print |tableEncryptionConfigs|, " tableEncryptionConfigs.\n";
80+
print |largeEncryptionConfigs|, " largeEncryptionConfigs.\n";
81+
print |queries|, " queries.\n";
82+
print |names|, " names.\n";
83+
print |values|, " values.\n";
84+
print |failingQueries|, " failingQueries.\n";
85+
print |complexTests|, " complexTests.\n";
86+
print |ioTests|, " ioTests.\n";
87+
print |configsForIoTest|, " configsForIoTest.\n";
88+
print |configsForModTest|, " configsForModTest.\n";
89+
print |strings|, " strings.\n";
90+
print |large|, " large.\n";
91+
if |roundTripTests| != 0 {
92+
print |roundTripTests[0].configs|, " configs and ", |roundTripTests[0].records|, " records for round trip.\n";
93+
}
94+
if |roundTripTests| > 1 {
95+
print |roundTripTests[1].configs|, " configs and ", |roundTripTests[1].records|, " records for round trip.\n";
96+
}
97+
98+
var _ :- expect DecryptManifest.Decrypt("decrypt_dotnet_32.json", keyVectors);
99+
var _ :- expect DecryptManifest.Decrypt("decrypt_java_32.json", keyVectors);
100+
var _ :- expect DecryptManifest.Decrypt("decrypt_dotnet_33.json", keyVectors);
101+
var _ :- expect DecryptManifest.Decrypt("decrypt_java_33.json", keyVectors);
102+
var _ :- expect DecryptManifest.Decrypt("decrypt_dotnet_33a.json", keyVectors);
103+
var _ :- expect DecryptManifest.Decrypt("decrypt_java_33a.json", keyVectors);
104+
var _ :- expect DecryptManifest.Decrypt("decrypt_rust_38.json", keyVectors);
105+
var _ :- expect WriteManifest.Write("encrypt.json");
106+
var _ :- expect EncryptManifest.Encrypt("encrypt.json", "decrypt.json", "java", "3.3", keyVectors);
107+
var _ :- expect DecryptManifest.Decrypt("decrypt.json", keyVectors);
108+
if |globalRecords| + |tableEncryptionConfigs| + |queries| == 0 {
109+
print "\nRunning no tests\n";
110+
return;
111+
}
112+
Validate();
113+
StringOrdering();
114+
LargeTests();
115+
BasicIoTest();
116+
RunIoTests();
117117
BasicQueryTest();
118118
ConfigModTest();
119119
ComplexTests();

TestVectors/runtimes/python/src/aws_dbesdk_dynamodb_test_vectors/internaldafny/extern/CreateInterceptedDDBTable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def CreateInterceptedDDBClient(dafny_encryption_config):
291291
# If needed, >1 table could be supported by setting up an EncryptedTablesManager
292292
raise ValueError(">1 table not supported")
293293
# For TestVectors, use local DynamoDB endpoint
294-
table = boto3.resource('dynamodb').Table(table_config_names[0])
294+
table = boto3.resource('dynamodb', endpoint_url="http://localhost:8000").Table(table_config_names[0])
295295
encrypted_table = EncryptedTable(table = table, encryption_config = native_encryption_config)
296296
wrapped_encrypted_table = DynamoDBClientWrapperForDynamoDBTable(table = encrypted_table, client = boto3_client)
297297
return aws_cryptography_internal_dynamodb.internaldafny.extern.Com_Amazonaws_Dynamodb.default__.DynamoDBClient(wrapped_encrypted_table)

TestVectors/runtimes/python/src/aws_dbesdk_dynamodb_test_vectors/waiting_boto3_ddb_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ class WaitingLocalDynamoClient:
1010
All other methods besides these are unchanged and will call the boto3 client directly.
1111
"""
1212
def __init__(self):
13-
# self._client = boto3.client("dynamodb", endpoint_url="http://localhost:8000")
14-
self._client = boto3.client("dynamodb")
13+
self._client = boto3.client("dynamodb", endpoint_url="http://localhost:8000")
1514

1615
def __getattr__(self, name):
1716
if hasattr(self._client, name):

0 commit comments

Comments
 (0)