diff options
author | Adi Zaimi <adizaimi@yahoo.com> | 2021-08-18 18:17:06 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-23 15:54:17 +0000 |
commit | 9c650b1b90d19b2122b856b3fbcb3976f2a03c07 (patch) | |
tree | ee27ad106fe03fd312fe604bd83959fcc79ef9da /jstests/client_encrypt | |
parent | 9214969b876f47c277623f7f6fe60bb13adcf7ad (diff) | |
download | mongo-9c650b1b90d19b2122b856b3fbcb3976f2a03c07.tar.gz |
SERVER-54187 Have valid BinData in tests
Some tests had invalid type 2, 3, and 4 BinData which was causing
some python scripts to fail during testing. This checkin replaces
the invalid data with valid ones so there should be no more of
such failures.
Diffstat (limited to 'jstests/client_encrypt')
-rw-r--r-- | jstests/client_encrypt/fle_encrypt_decrypt_shell.js | 16 | ||||
-rw-r--r-- | jstests/client_encrypt/lib/fle_command_line_explicit_encryption.js | 4 |
2 files changed, 13 insertions, 7 deletions
diff --git a/jstests/client_encrypt/fle_encrypt_decrypt_shell.js b/jstests/client_encrypt/fle_encrypt_decrypt_shell.js index b56e178f0b0..391ed1a61b4 100644 --- a/jstests/client_encrypt/fle_encrypt_decrypt_shell.js +++ b/jstests/client_encrypt/fle_encrypt_decrypt_shell.js @@ -56,8 +56,8 @@ const passTestCases = [ new Date('December 17, 1995 03:24:00'), BinData(0, '1234'), BinData(1, '1234'), - BinData(3, '1234'), - BinData(4, '1234'), + BinData(3, "OEJTfmD8twzaj/LPKLIVkA=="), + BinData(4, "OEJTfmD8twzaj/LPKLIVkA=="), BinData(5, '1234'), BinData(6, '1234'), new Timestamp(1, 2), @@ -76,8 +76,14 @@ const failDeterministic = [ Code("function() { return true; }") ]; -const failTestCases = - [null, undefined, MinKey(), MaxKey(), DBRef("test", "test", "test"), BinData(2, '1234')]; +const failTestCases = [ + null, + undefined, + MinKey(), + MaxKey(), + DBRef("test", "test", "test"), + BinData(2, "BAAAADEyMzQ=") +]; const shell = Mongo(conn.host, clientSideFLEOptions); const keyVault = shell.getKeyVault(); @@ -119,4 +125,4 @@ for (const kmsType of kmsTypes) { MongoRunner.stopMongod(conn); mock_kms.stop(); -}());
\ No newline at end of file +}()); diff --git a/jstests/client_encrypt/lib/fle_command_line_explicit_encryption.js b/jstests/client_encrypt/lib/fle_command_line_explicit_encryption.js index 0c7ddc30320..1e89f348917 100644 --- a/jstests/client_encrypt/lib/fle_command_line_explicit_encryption.js +++ b/jstests/client_encrypt/lib/fle_command_line_explicit_encryption.js @@ -28,7 +28,7 @@ const passTestCases = [ UUID(), ISODate(), new Date('December 17, 1995 03:24:00'), - BinData(2, '1234'), + BinData(0, '1234'), new Timestamp(1, 2), new ObjectId(), new DBPointer("mongo", new ObjectId()), @@ -80,4 +80,4 @@ for (const encryptionAlgorithm of encryptionAlgorithms) { mock_kms.stop(); print("Test completed with no errors."); -}());
\ No newline at end of file +}()); |