diff --git a/.evergreen.yml b/.evergreen.yml index b4116a8ea..4cd885d65 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -983,8 +983,8 @@ functions: params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_darwin-m82rc_n20-cli_repl.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82rc_n20-cli_repl.tgz + local_file: src/nyc-output-tests_darwin-m82xc_n20-cli_repl.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82xc_n20-cli_repl.tgz bucket: mciuploads - command: shell.exec params: @@ -992,13 +992,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_darwin-m82rc_n20-cli_repl.tgz + tar xvzf nyc-output-tests_darwin-m82xc_n20-cli_repl.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_darwin-m82rc_n20-e2e_tests.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82rc_n20-e2e_tests.tgz + local_file: src/nyc-output-tests_darwin-m82xc_n20-e2e_tests.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82xc_n20-e2e_tests.tgz bucket: mciuploads - command: shell.exec params: @@ -1006,13 +1006,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_darwin-m82rc_n20-e2e_tests.tgz + tar xvzf nyc-output-tests_darwin-m82xc_n20-e2e_tests.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_darwin-m82rc_n20-node_runtime_worker_thread.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82rc_n20-node_runtime_worker_thread.tgz + local_file: src/nyc-output-tests_darwin-m82xc_n20-node_runtime_worker_thread.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82xc_n20-node_runtime_worker_thread.tgz bucket: mciuploads - command: shell.exec params: @@ -1020,13 +1020,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_darwin-m82rc_n20-node_runtime_worker_thread.tgz + tar xvzf nyc-output-tests_darwin-m82xc_n20-node_runtime_worker_thread.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_darwin-m82rc_n20-service_provider_node_driver.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82rc_n20-service_provider_node_driver.tgz + local_file: src/nyc-output-tests_darwin-m82xc_n20-service_provider_node_driver.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82xc_n20-service_provider_node_driver.tgz bucket: mciuploads - command: shell.exec params: @@ -1034,13 +1034,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_darwin-m82rc_n20-service_provider_node_driver.tgz + tar xvzf nyc-output-tests_darwin-m82xc_n20-service_provider_node_driver.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_darwin-m82rc_n20-shell_api.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82rc_n20-shell_api.tgz + local_file: src/nyc-output-tests_darwin-m82xc_n20-shell_api.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82xc_n20-shell_api.tgz bucket: mciuploads - command: shell.exec params: @@ -1048,13 +1048,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_darwin-m82rc_n20-shell_api.tgz + tar xvzf nyc-output-tests_darwin-m82xc_n20-shell_api.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_darwin-m82rce_n20-cli_repl.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82rce_n20-cli_repl.tgz + local_file: src/nyc-output-tests_darwin-m82xe_n20-cli_repl.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82xe_n20-cli_repl.tgz bucket: mciuploads - command: shell.exec params: @@ -1062,13 +1062,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_darwin-m82rce_n20-cli_repl.tgz + tar xvzf nyc-output-tests_darwin-m82xe_n20-cli_repl.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_darwin-m82rce_n20-e2e_tests.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82rce_n20-e2e_tests.tgz + local_file: src/nyc-output-tests_darwin-m82xe_n20-e2e_tests.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82xe_n20-e2e_tests.tgz bucket: mciuploads - command: shell.exec params: @@ -1076,13 +1076,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_darwin-m82rce_n20-e2e_tests.tgz + tar xvzf nyc-output-tests_darwin-m82xe_n20-e2e_tests.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_darwin-m82rce_n20-node_runtime_worker_thread.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82rce_n20-node_runtime_worker_thread.tgz + local_file: src/nyc-output-tests_darwin-m82xe_n20-node_runtime_worker_thread.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82xe_n20-node_runtime_worker_thread.tgz bucket: mciuploads - command: shell.exec params: @@ -1090,13 +1090,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_darwin-m82rce_n20-node_runtime_worker_thread.tgz + tar xvzf nyc-output-tests_darwin-m82xe_n20-node_runtime_worker_thread.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_darwin-m82rce_n20-service_provider_node_driver.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82rce_n20-service_provider_node_driver.tgz + local_file: src/nyc-output-tests_darwin-m82xe_n20-service_provider_node_driver.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82xe_n20-service_provider_node_driver.tgz bucket: mciuploads - command: shell.exec params: @@ -1104,13 +1104,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_darwin-m82rce_n20-service_provider_node_driver.tgz + tar xvzf nyc-output-tests_darwin-m82xe_n20-service_provider_node_driver.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_darwin-m82rce_n20-shell_api.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82rce_n20-shell_api.tgz + local_file: src/nyc-output-tests_darwin-m82xe_n20-shell_api.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_darwin-m82xe_n20-shell_api.tgz bucket: mciuploads - command: shell.exec params: @@ -1118,7 +1118,7 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_darwin-m82rce_n20-shell_api.tgz + tar xvzf nyc-output-tests_darwin-m82xe_n20-shell_api.tgz - command: s3.get params: aws_key: ${aws_key} @@ -2439,8 +2439,8 @@ functions: params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rc_n20-cli_repl.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rc_n20-cli_repl.tgz + local_file: src/nyc-output-tests_linux-m82xc_n20-cli_repl.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xc_n20-cli_repl.tgz bucket: mciuploads - command: shell.exec params: @@ -2448,13 +2448,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rc_n20-cli_repl.tgz + tar xvzf nyc-output-tests_linux-m82xc_n20-cli_repl.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rc_n20-e2e_tests.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rc_n20-e2e_tests.tgz + local_file: src/nyc-output-tests_linux-m82xc_n20-e2e_tests.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xc_n20-e2e_tests.tgz bucket: mciuploads - command: shell.exec params: @@ -2462,13 +2462,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rc_n20-e2e_tests.tgz + tar xvzf nyc-output-tests_linux-m82xc_n20-e2e_tests.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rc_n20-java_shell.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rc_n20-java_shell.tgz + local_file: src/nyc-output-tests_linux-m82xc_n20-java_shell.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xc_n20-java_shell.tgz bucket: mciuploads - command: shell.exec params: @@ -2476,13 +2476,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rc_n20-java_shell.tgz + tar xvzf nyc-output-tests_linux-m82xc_n20-java_shell.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rc_n20-node_runtime_worker_thread.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rc_n20-node_runtime_worker_thread.tgz + local_file: src/nyc-output-tests_linux-m82xc_n20-node_runtime_worker_thread.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xc_n20-node_runtime_worker_thread.tgz bucket: mciuploads - command: shell.exec params: @@ -2490,13 +2490,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rc_n20-node_runtime_worker_thread.tgz + tar xvzf nyc-output-tests_linux-m82xc_n20-node_runtime_worker_thread.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rc_n20-service_provider_node_driver.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rc_n20-service_provider_node_driver.tgz + local_file: src/nyc-output-tests_linux-m82xc_n20-service_provider_node_driver.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xc_n20-service_provider_node_driver.tgz bucket: mciuploads - command: shell.exec params: @@ -2504,13 +2504,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rc_n20-service_provider_node_driver.tgz + tar xvzf nyc-output-tests_linux-m82xc_n20-service_provider_node_driver.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rc_n20-shell_api.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rc_n20-shell_api.tgz + local_file: src/nyc-output-tests_linux-m82xc_n20-shell_api.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xc_n20-shell_api.tgz bucket: mciuploads - command: shell.exec params: @@ -2518,13 +2518,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rc_n20-shell_api.tgz + tar xvzf nyc-output-tests_linux-m82xc_n20-shell_api.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rce_n20-cli_repl.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rce_n20-cli_repl.tgz + local_file: src/nyc-output-tests_linux-m82xe_n20-cli_repl.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xe_n20-cli_repl.tgz bucket: mciuploads - command: shell.exec params: @@ -2532,13 +2532,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rce_n20-cli_repl.tgz + tar xvzf nyc-output-tests_linux-m82xe_n20-cli_repl.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rce_n20-e2e_tests.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rce_n20-e2e_tests.tgz + local_file: src/nyc-output-tests_linux-m82xe_n20-e2e_tests.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xe_n20-e2e_tests.tgz bucket: mciuploads - command: shell.exec params: @@ -2546,13 +2546,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rce_n20-e2e_tests.tgz + tar xvzf nyc-output-tests_linux-m82xe_n20-e2e_tests.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rce_n20-java_shell.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rce_n20-java_shell.tgz + local_file: src/nyc-output-tests_linux-m82xe_n20-java_shell.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xe_n20-java_shell.tgz bucket: mciuploads - command: shell.exec params: @@ -2560,13 +2560,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rce_n20-java_shell.tgz + tar xvzf nyc-output-tests_linux-m82xe_n20-java_shell.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rce_n20-node_runtime_worker_thread.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rce_n20-node_runtime_worker_thread.tgz + local_file: src/nyc-output-tests_linux-m82xe_n20-node_runtime_worker_thread.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xe_n20-node_runtime_worker_thread.tgz bucket: mciuploads - command: shell.exec params: @@ -2574,13 +2574,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rce_n20-node_runtime_worker_thread.tgz + tar xvzf nyc-output-tests_linux-m82xe_n20-node_runtime_worker_thread.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rce_n20-service_provider_node_driver.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rce_n20-service_provider_node_driver.tgz + local_file: src/nyc-output-tests_linux-m82xe_n20-service_provider_node_driver.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xe_n20-service_provider_node_driver.tgz bucket: mciuploads - command: shell.exec params: @@ -2588,13 +2588,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rce_n20-service_provider_node_driver.tgz + tar xvzf nyc-output-tests_linux-m82xe_n20-service_provider_node_driver.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_linux-m82rce_n20-shell_api.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82rce_n20-shell_api.tgz + local_file: src/nyc-output-tests_linux-m82xe_n20-shell_api.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_linux-m82xe_n20-shell_api.tgz bucket: mciuploads - command: shell.exec params: @@ -2602,7 +2602,7 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_linux-m82rce_n20-shell_api.tgz + tar xvzf nyc-output-tests_linux-m82xe_n20-shell_api.tgz - command: s3.get params: aws_key: ${aws_key} @@ -3839,8 +3839,8 @@ functions: params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_win32-m82rc_n20-cli_repl.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82rc_n20-cli_repl.tgz + local_file: src/nyc-output-tests_win32-m82xc_n20-cli_repl.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82xc_n20-cli_repl.tgz bucket: mciuploads - command: shell.exec params: @@ -3848,13 +3848,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_win32-m82rc_n20-cli_repl.tgz + tar xvzf nyc-output-tests_win32-m82xc_n20-cli_repl.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_win32-m82rc_n20-e2e_tests.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82rc_n20-e2e_tests.tgz + local_file: src/nyc-output-tests_win32-m82xc_n20-e2e_tests.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82xc_n20-e2e_tests.tgz bucket: mciuploads - command: shell.exec params: @@ -3862,13 +3862,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_win32-m82rc_n20-e2e_tests.tgz + tar xvzf nyc-output-tests_win32-m82xc_n20-e2e_tests.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_win32-m82rc_n20-node_runtime_worker_thread.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82rc_n20-node_runtime_worker_thread.tgz + local_file: src/nyc-output-tests_win32-m82xc_n20-node_runtime_worker_thread.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82xc_n20-node_runtime_worker_thread.tgz bucket: mciuploads - command: shell.exec params: @@ -3876,13 +3876,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_win32-m82rc_n20-node_runtime_worker_thread.tgz + tar xvzf nyc-output-tests_win32-m82xc_n20-node_runtime_worker_thread.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_win32-m82rc_n20-service_provider_node_driver.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82rc_n20-service_provider_node_driver.tgz + local_file: src/nyc-output-tests_win32-m82xc_n20-service_provider_node_driver.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82xc_n20-service_provider_node_driver.tgz bucket: mciuploads - command: shell.exec params: @@ -3890,13 +3890,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_win32-m82rc_n20-service_provider_node_driver.tgz + tar xvzf nyc-output-tests_win32-m82xc_n20-service_provider_node_driver.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_win32-m82rc_n20-shell_api.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82rc_n20-shell_api.tgz + local_file: src/nyc-output-tests_win32-m82xc_n20-shell_api.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82xc_n20-shell_api.tgz bucket: mciuploads - command: shell.exec params: @@ -3904,13 +3904,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_win32-m82rc_n20-shell_api.tgz + tar xvzf nyc-output-tests_win32-m82xc_n20-shell_api.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_win32-m82rce_n20-cli_repl.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82rce_n20-cli_repl.tgz + local_file: src/nyc-output-tests_win32-m82xe_n20-cli_repl.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82xe_n20-cli_repl.tgz bucket: mciuploads - command: shell.exec params: @@ -3918,13 +3918,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_win32-m82rce_n20-cli_repl.tgz + tar xvzf nyc-output-tests_win32-m82xe_n20-cli_repl.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_win32-m82rce_n20-e2e_tests.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82rce_n20-e2e_tests.tgz + local_file: src/nyc-output-tests_win32-m82xe_n20-e2e_tests.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82xe_n20-e2e_tests.tgz bucket: mciuploads - command: shell.exec params: @@ -3932,13 +3932,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_win32-m82rce_n20-e2e_tests.tgz + tar xvzf nyc-output-tests_win32-m82xe_n20-e2e_tests.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_win32-m82rce_n20-node_runtime_worker_thread.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82rce_n20-node_runtime_worker_thread.tgz + local_file: src/nyc-output-tests_win32-m82xe_n20-node_runtime_worker_thread.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82xe_n20-node_runtime_worker_thread.tgz bucket: mciuploads - command: shell.exec params: @@ -3946,13 +3946,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_win32-m82rce_n20-node_runtime_worker_thread.tgz + tar xvzf nyc-output-tests_win32-m82xe_n20-node_runtime_worker_thread.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_win32-m82rce_n20-service_provider_node_driver.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82rce_n20-service_provider_node_driver.tgz + local_file: src/nyc-output-tests_win32-m82xe_n20-service_provider_node_driver.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82xe_n20-service_provider_node_driver.tgz bucket: mciuploads - command: shell.exec params: @@ -3960,13 +3960,13 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_win32-m82rce_n20-service_provider_node_driver.tgz + tar xvzf nyc-output-tests_win32-m82xe_n20-service_provider_node_driver.tgz - command: s3.get params: aws_key: ${aws_key} aws_secret: ${aws_secret} - local_file: src/nyc-output-tests_win32-m82rce_n20-shell_api.tgz - remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82rce_n20-shell_api.tgz + local_file: src/nyc-output-tests_win32-m82xe_n20-shell_api.tgz + remote_file: mongosh/binaries/${revision}/${revision_order_id}/nyc-output-tests_win32-m82xe_n20-shell_api.tgz bucket: mciuploads - command: shell.exec params: @@ -3974,7 +3974,7 @@ functions: shell: bash script: | set -e - tar xvzf nyc-output-tests_win32-m82rce_n20-shell_api.tgz + tar xvzf nyc-output-tests_win32-m82xe_n20-shell_api.tgz - command: s3.get params: aws_key: ${aws_key} @@ -5087,25 +5087,25 @@ tasks: - name: test_shell_api variant: tests_darwin-m80xe_n20 - name: test_cli_repl - variant: tests_darwin-m82rc_n20 + variant: tests_darwin-m82xc_n20 - name: test_e2e_tests - variant: tests_darwin-m82rc_n20 + variant: tests_darwin-m82xc_n20 - name: test_node_runtime_worker_thread - variant: tests_darwin-m82rc_n20 + variant: tests_darwin-m82xc_n20 - name: test_service_provider_node_driver - variant: tests_darwin-m82rc_n20 + variant: tests_darwin-m82xc_n20 - name: test_shell_api - variant: tests_darwin-m82rc_n20 + variant: tests_darwin-m82xc_n20 - name: test_cli_repl - variant: tests_darwin-m82rce_n20 + variant: tests_darwin-m82xe_n20 - name: test_e2e_tests - variant: tests_darwin-m82rce_n20 + variant: tests_darwin-m82xe_n20 - name: test_node_runtime_worker_thread - variant: tests_darwin-m82rce_n20 + variant: tests_darwin-m82xe_n20 - name: test_service_provider_node_driver - variant: tests_darwin-m82rce_n20 + variant: tests_darwin-m82xe_n20 - name: test_shell_api - variant: tests_darwin-m82rce_n20 + variant: tests_darwin-m82xe_n20 - name: test_cli_repl variant: tests_darwin-mlatest_n20 - name: test_e2e_tests @@ -5295,29 +5295,29 @@ tasks: - name: test_shell_api variant: tests_linux-m80xe_n20 - name: test_cli_repl - variant: tests_linux-m82rc_n20 + variant: tests_linux-m82xc_n20 - name: test_e2e_tests - variant: tests_linux-m82rc_n20 + variant: tests_linux-m82xc_n20 - name: test_java_shell - variant: tests_linux-m82rc_n20 + variant: tests_linux-m82xc_n20 - name: test_node_runtime_worker_thread - variant: tests_linux-m82rc_n20 + variant: tests_linux-m82xc_n20 - name: test_service_provider_node_driver - variant: tests_linux-m82rc_n20 + variant: tests_linux-m82xc_n20 - name: test_shell_api - variant: tests_linux-m82rc_n20 + variant: tests_linux-m82xc_n20 - name: test_cli_repl - variant: tests_linux-m82rce_n20 + variant: tests_linux-m82xe_n20 - name: test_e2e_tests - variant: tests_linux-m82rce_n20 + variant: tests_linux-m82xe_n20 - name: test_java_shell - variant: tests_linux-m82rce_n20 + variant: tests_linux-m82xe_n20 - name: test_node_runtime_worker_thread - variant: tests_linux-m82rce_n20 + variant: tests_linux-m82xe_n20 - name: test_service_provider_node_driver - variant: tests_linux-m82rce_n20 + variant: tests_linux-m82xe_n20 - name: test_shell_api - variant: tests_linux-m82rce_n20 + variant: tests_linux-m82xe_n20 - name: test_cli_repl variant: tests_linux-mlatest_n20 - name: test_e2e_tests @@ -5495,25 +5495,25 @@ tasks: - name: test_shell_api variant: tests_win32-m80xe_n20 - name: test_cli_repl - variant: tests_win32-m82rc_n20 + variant: tests_win32-m82xc_n20 - name: test_e2e_tests - variant: tests_win32-m82rc_n20 + variant: tests_win32-m82xc_n20 - name: test_node_runtime_worker_thread - variant: tests_win32-m82rc_n20 + variant: tests_win32-m82xc_n20 - name: test_service_provider_node_driver - variant: tests_win32-m82rc_n20 + variant: tests_win32-m82xc_n20 - name: test_shell_api - variant: tests_win32-m82rc_n20 + variant: tests_win32-m82xc_n20 - name: test_cli_repl - variant: tests_win32-m82rce_n20 + variant: tests_win32-m82xe_n20 - name: test_e2e_tests - variant: tests_win32-m82rce_n20 + variant: tests_win32-m82xe_n20 - name: test_node_runtime_worker_thread - variant: tests_win32-m82rce_n20 + variant: tests_win32-m82xe_n20 - name: test_service_provider_node_driver - variant: tests_win32-m82rce_n20 + variant: tests_win32-m82xe_n20 - name: test_shell_api - variant: tests_win32-m82rce_n20 + variant: tests_win32-m82xe_n20 - name: test_cli_repl variant: tests_win32-mlatest_n20 - name: test_e2e_tests @@ -10598,13 +10598,13 @@ buildvariants: - name: test_shell_evaluator - name: test_snippet_manager - name: test_types - - name: tests_darwin-m82rc_n20 - display_name: "MacOS 14 arm64 m82rc n20 (Unit tests)" + - name: tests_darwin-m82xc_n20 + display_name: "MacOS 14 arm64 m82xc n20 (Unit tests)" run_on: macos-14-arm64 tags: [] expansions: executable_os_id: darwin-arm64 - mongosh_server_test_version: "8.2.0-rc4" + mongosh_server_test_version: "8.2.0" node_js_version: "20.19.5" mongosh_skip_node_version_check: "" tasks: @@ -10631,13 +10631,13 @@ buildvariants: - name: test_shell_evaluator - name: test_snippet_manager - name: test_types - - name: tests_darwin-m82rce_n20 - display_name: "MacOS 14 arm64 m82rce n20 (Unit tests)" + - name: tests_darwin-m82xe_n20 + display_name: "MacOS 14 arm64 m82xe n20 (Unit tests)" run_on: macos-14-arm64 tags: [] expansions: executable_os_id: darwin-arm64 - mongosh_server_test_version: "8.2.0-rc4-enterprise" + mongosh_server_test_version: "8.2.0-enterprise" node_js_version: "20.19.5" mongosh_skip_node_version_check: "" tasks: @@ -11093,13 +11093,13 @@ buildvariants: - name: test_shell_evaluator - name: test_snippet_manager - name: test_types - - name: tests_linux-m82rc_n20 - display_name: "Ubuntu 20.04 x64 m82rc n20 (Unit tests)" + - name: tests_linux-m82xc_n20 + display_name: "Ubuntu 20.04 x64 m82xc n20 (Unit tests)" run_on: ubuntu2004-small tags: ["nightly-driver"] expansions: executable_os_id: darwin-arm64 - mongosh_server_test_version: "8.2.0-rc4" + mongosh_server_test_version: "8.2.0" node_js_version: "20.19.5" mongosh_skip_node_version_check: "" tasks: @@ -11126,13 +11126,13 @@ buildvariants: - name: test_shell_evaluator - name: test_snippet_manager - name: test_types - - name: tests_linux-m82rce_n20 - display_name: "Ubuntu 20.04 x64 m82rce n20 (Unit tests)" + - name: tests_linux-m82xe_n20 + display_name: "Ubuntu 20.04 x64 m82xe n20 (Unit tests)" run_on: ubuntu2004-small tags: ["nightly-driver"] expansions: executable_os_id: darwin-arm64 - mongosh_server_test_version: "8.2.0-rc4-enterprise" + mongosh_server_test_version: "8.2.0-enterprise" node_js_version: "20.19.5" mongosh_skip_node_version_check: "" tasks: @@ -11608,13 +11608,13 @@ buildvariants: - name: test_shell_evaluator - name: test_snippet_manager - name: test_types - - name: tests_win32-m82rc_n20 - display_name: "Windows m82rc n20 (Unit tests)" + - name: tests_win32-m82xc_n20 + display_name: "Windows m82xc n20 (Unit tests)" run_on: windows-vsCurrent-small tags: [] expansions: executable_os_id: win32 - mongosh_server_test_version: "8.2.0-rc4" + mongosh_server_test_version: "8.2.0" node_js_version: "20.19.5" mongosh_skip_node_version_check: "" tasks: @@ -11640,13 +11640,13 @@ buildvariants: - name: test_shell_evaluator - name: test_snippet_manager - name: test_types - - name: tests_win32-m82rce_n20 - display_name: "Windows m82rce n20 (Unit tests)" + - name: tests_win32-m82xe_n20 + display_name: "Windows m82xe n20 (Unit tests)" run_on: windows-vsCurrent-small tags: [] expansions: executable_os_id: win32 - mongosh_server_test_version: "8.2.0-rc4-enterprise" + mongosh_server_test_version: "8.2.0-enterprise" node_js_version: "20.19.5" mongosh_skip_node_version_check: "" tasks: diff --git a/.evergreen/constants.js b/.evergreen/constants.js index 407bbf114..c51a08185 100644 --- a/.evergreen/constants.js +++ b/.evergreen/constants.js @@ -37,8 +37,8 @@ exports.MONGODB_VERSIONS = [ { shortName: '70xe', versionSpec: '7.0.x-enterprise' }, { shortName: '80xc', versionSpec: '8.0.x' }, { shortName: '80xe', versionSpec: '8.0.x-enterprise' }, - { shortName: '82rc', versionSpec: '8.2.0-rc4' }, - { shortName: '82rce', versionSpec: '8.2.0-rc4-enterprise' }, + { shortName: '82xc', versionSpec: '8.2.0' }, + { shortName: '82xe', versionSpec: '8.2.0-enterprise' }, { shortName: 'latest', versionSpec: 'latest-alpha-enterprise' }, ]; diff --git a/packages/build/src/packaging/download-crypt-library.ts b/packages/build/src/packaging/download-crypt-library.ts index 64a2451f8..b08171131 100644 --- a/packages/build/src/packaging/download-crypt-library.ts +++ b/packages/build/src/packaging/download-crypt-library.ts @@ -7,7 +7,8 @@ import type { PackageVariant } from '../config'; import { getDistro, getArch } from '../config'; export async function downloadCryptLibrary( - variant: PackageVariant | 'host' + variant: PackageVariant | 'host', + versionSpec = '' ): Promise<{ cryptLibrary: string; version: string }> { let opts: DownloadOptions = {}; opts.arch = variant === 'host' ? undefined : getArch(variant); @@ -32,15 +33,19 @@ export async function downloadCryptLibrary( 'crypt-store', variant ); - // Download mongodb for latest server version, including rapid releases - // (for the platforms that they exist for, i.e. for ppc64le/s390x only pick stable releases). - let versionSpec = '8.0.12'; // TODO(MONGOSH-2192): Switch back to 'continuous' and deal with affected platform support. - if (/ppc64|s390x/.test(opts.arch || process.arch)) { - versionSpec = '8.0.12'; - } - if ((opts.platform || process.platform) === 'darwin') { - versionSpec = '8.0.5'; // TBD(MONGOSH-2192,SERVER-101020): Figure out at what point we use a later version. + + if (!versionSpec) { + // Download mongodb for latest server version, including rapid releases + // (for the platforms that they exist for, i.e. for ppc64le/s390x only pick stable releases). + versionSpec = '8.0.12'; // TODO(MONGOSH-2192): Switch back to 'continuous' and deal with affected platform support. + + if (/ppc64|s390x/.test(opts.arch || process.arch)) { + versionSpec = '8.0.12'; + } else if ((opts.platform || process.platform) === 'darwin') { + versionSpec = '8.0.5'; // TBD(MONGOSH-2192,SERVER-101020): Figure out at what point we use a later version. + } } + const { downloadedBinDir: libdir, version } = await downloadMongoDbWithVersionInfo(cryptTmpTargetDir, versionSpec, opts); const cryptLibrary = path.join( @@ -51,7 +56,9 @@ export async function downloadCryptLibrary( ); // Make sure that the binary exists and is readable. await fs.access(cryptLibrary, fsConstants.R_OK); - console.info('mongosh: downloaded', cryptLibrary, 'version', version); + console.info( + `mongosh: downloaded ${cryptLibrary} version ${version} (requested: ${versionSpec})` + ); return { cryptLibrary, version }; } diff --git a/packages/e2e-tests/test/e2e-fle.spec.ts b/packages/e2e-tests/test/e2e-fle.spec.ts index e022a587d..ae86e55d3 100644 --- a/packages/e2e-tests/test/e2e-fle.spec.ts +++ b/packages/e2e-tests/test/e2e-fle.spec.ts @@ -8,6 +8,7 @@ import { skipIfServerVersion, skipIfCommunityServer, downloadCurrentCryptSharedLibrary, + sortObjectArray, } from '../../../testing/integration-testing-hooks'; import { makeFakeHTTPServer, fakeAWSHandlers } from '../../../testing/fake-kms'; import { once } from 'events'; @@ -25,6 +26,7 @@ describe('FLE tests', function () { let kmsServer: ReturnType; let dbname: string; let cryptLibrary: string; + let cryptLibrary82: string; before(async function () { if (process.platform === 'linux') { @@ -39,7 +41,11 @@ describe('FLE tests', function () { kmsServer = makeFakeHTTPServer(fakeAWSHandlers); kmsServer.listen(0); await once(kmsServer, 'listening'); - cryptLibrary = await downloadCurrentCryptSharedLibrary(); + // TODO(MONGOSH-2192): Go back to always testing with latest continuous version. + [cryptLibrary, cryptLibrary82] = await Promise.all([ + downloadCurrentCryptSharedLibrary(), + downloadCurrentCryptSharedLibrary('8.2.0'), + ]); }); after(function () { kmsServer?.close(); @@ -855,13 +861,6 @@ describe('FLE tests', function () { }); it('allows automatic range encryption', async function () { - // TODO(MONGOSH-1550): On s390x, we are using the 6.0.x RHEL7 shared library, - // which does not support QE rangePreview/range. That's just fine for preview, but - // we should switch to the 7.0.x RHEL8 shared library for Range GA. - if (process.arch === 's390x') { - return this.skip(); - } - const shell = this.startTestShell({ args: ['--nodb', `--cryptSharedLibPath=${cryptLibrary}`], }); @@ -914,6 +913,311 @@ describe('FLE tests', function () { }); }); + context('8.2+', function () { + skipIfServerVersion(testServer, '< 8.2'); + + context('$lookup support', function () { + skipIfCommunityServer(testServer); + + it('allows $lookup with a collection with automatic encryption', async function () { + const shell = this.startTestShell({ + args: [ + `--cryptSharedLibPath=${cryptLibrary82}`, + await testServer.connectionString(), + ], + }); + await shell.executeLine(`{ + const keyMongo = Mongo( + db.getMongo(), + { + keyVaultNamespace: '${dbname}.__keyVault', + kmsProviders: { local: { key: 'A'.repeat(128) } }, + } + ); + + const keyVault = keyMongo.getKeyVault(); + + const dataKey1 = keyVault.createKey('local'); + const dataKey2 = keyVault.createKey('local'); + + const schemaMap = { + ['${dbname}.coll1']: { + bsonType: 'object', + properties: { + phoneNumber: { + encrypt: { + bsonType: 'string', + keyId: [dataKey1], + algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic', + }, + }, + key: { + bsonType: 'string', + }, + }, + }, + ['${dbname}.coll2']: { + bsonType: 'object', + properties: { + phoneNumber: { + encrypt: { + bsonType: 'string', + keyId: [dataKey2], + algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic', + }, + }, + key: { + bsonType: 'string', + }, + }, + }, + }; + + autoMongo = new Mongo(db.getMongo(), { + keyVaultNamespace: '${dbname}.__keyVault', + kmsProviders: { local: { key: 'A'.repeat(128) } }, + schemaMap, + }); + + coll1 = autoMongo.getDB('${dbname}').getCollection('coll1'); + coll1.insertMany([ + { phoneNumber: '123-456-7890', key: 'foo' }, + { phoneNumber: '123-456-7891', key: 'bar' }, + ]); + + coll2 = autoMongo.getDB('${dbname}').getCollection('coll2'); + coll2.insertMany([ + { phoneNumber: '123-456-7892', key: 'baz' }, + { phoneNumber: '123-456-7893', key: 'foo' }, + ]); + }`); + const result = await shell.executeLineWithJSONResult(`( + coll1.aggregate([ + { + $lookup: { + from: 'coll2', + localField: 'key', + foreignField: 'key', + as: 'lookupMatch', + }, + }, + ]) + .map(({ key, lookupMatch }) => ({ key, size: lookupMatch.length })) + .toArray())`); + expect(result).to.deep.equal([ + { key: 'foo', size: 1 }, + { key: 'bar', size: 0 }, + ]); + }); + }); + + for (const mode of ['automatic', 'explicit'] as const) + context( + `Queryable Encryption Prefix/Suffix/Substring Support ${mode}`, + function () { + // Substring prefix support is enterprise-only 8.2+ + skipIfCommunityServer(testServer); + + let shell: TestShell; + + const testCollection = 'qeSubstringTest'; + + beforeEach(async function () { + shell = this.startTestShell({ + args: [ + `--cryptSharedLibPath=${cryptLibrary82}`, + await testServer.connectionString(), + ], + }); + await shell.waitForPrompt(); + + // Shared setup for all substring search tests - create collection once + await shell.executeLine(`{ + mode = ${JSON.stringify(mode)}; + opts = { + keyVaultNamespace: '${dbname}.__keyVault', + kmsProviders: { local: { key: 'A'.repeat(128) } }, + }; + + // Setup explicit encryption client + explicitMongo = Mongo(db.getMongo(), { ...opts, bypassQueryAnalysis: true }); + if (mode === 'automatic') { + autoMongo = Mongo(db.getMongo(), { ...opts }); + coll = autoMongo.getDB('${dbname}').${testCollection}; + } + + keyId1 = explicitMongo.getKeyVault().createKey('local'); + keyId2 = explicitMongo.getKeyVault().createKey('local'); + + substringOptions = { + strMinQueryLength: 2, + strMaxQueryLength: 10, + }; + encryptedFieldOptions = { + ...substringOptions, + caseSensitive: false, + diacriticSensitive: false, + contention: 4 + }; + + explicitMongo.getClientEncryption().createEncryptedCollection('${dbname}', '${testCollection}', { + provider: 'local', + createCollectionOptions: { + encryptedFields: { + fields: [{ + keyId: keyId1, + path: 'substringData', + bsonType: 'string', + queries: [{ + queryType: 'substringPreview', + strMaxLength: 60, + ...encryptedFieldOptions + }] + }, { + keyId: keyId2, + path: 'prefixSuffixData', + bsonType: 'string', + queries: [{ + queryType: 'prefixPreview', + ...encryptedFieldOptions + }, { + queryType: 'suffixPreview', + ...encryptedFieldOptions + }] + }] + } + } + }); + + ce = explicitMongo.getClientEncryption(); + ecoll = explicitMongo.getDB('${dbname}').${testCollection}; + + explicitOpts = (details) => ({ + algorithm: 'TextPreview', + contentionFactor: 4, + textOptions: { caseSensitive: false, diacriticSensitive: false, ...details } + }); + substringOpts = explicitOpts({ substring: { ...substringOptions, strMaxLength: 60 } }); + prefixSuffixOpts = explicitOpts({ prefix: substringOptions, suffix: substringOptions }); + methods = { + substring: { queryType: 'substringPreview', keyId: keyId1, options: substringOpts }, + prefix: { queryType: 'prefixPreview', keyId: keyId2, options: prefixSuffixOpts }, + suffix: { queryType: 'suffixPreview', keyId: keyId2, options: prefixSuffixOpts } + } + explicitEncrypt = (method, data) => { + return ce.encrypt(methods[method].keyId, data, { + ...methods[method].options, + queryType: methods[method].queryType + }); + }; + }`); + }); + + afterEach(function () { + shell.kill(); + }); + + it('allows queryable encryption with prefix searches', async function () { + // Insert test data for prefix searches + await shell.executeLine(`{ + for (const data of [ + 'admin_user_123.txt', + 'admin_super_456.pdf', + 'user_regular_789.pdf', + 'guest_access_000.txt', + 'just_user.txt', + 'admin_explicit_test.pdf' + ]) { + if (mode === 'automatic') { + coll.insertOne({ + substringData: data, + prefixSuffixData: data + }); + } else { + ecoll.insertOne({ + substringData: ce.encrypt(keyId1, data, substringOpts), + prefixSuffixData: ce.encrypt(keyId2, data, prefixSuffixOpts) + }); + } + } + }`); + const automaticEncrypt = (_method: string, data: string) => + JSON.stringify(data); + const explicitEncrypt = (method: string, data: string) => + `explicitEncrypt('${method}', ${JSON.stringify(data)})`; + const s = sortObjectArray; + + for (const [coll, maybeEncrypt] of mode === 'explicit' + ? ([['ecoll', explicitEncrypt]] as const) + : ([ + ['coll', automaticEncrypt], + ['ecoll', explicitEncrypt], + ] as const)) { + const prefixResults = await shell.executeLineWithJSONResult( + `${coll}.find({$expr: { $and: [{$encStrStartsWith: {prefix: ${maybeEncrypt( + 'prefix', + 'admin_' + )}, input: "$prefixSuffixData"}}] }}, { data: '$prefixSuffixData', _id: 0 }).toArray()` + ); + expect(s(prefixResults)).to.deep.equal( + s([ + { + data: 'admin_user_123.txt', + }, + { + data: 'admin_super_456.pdf', + }, + { + data: 'admin_explicit_test.pdf', + }, + ]) + ); + + const suffixResults = await shell.executeLineWithJSONResult(` + ${coll}.find({$expr: { $and: [{$encStrEndsWith: {suffix: ${maybeEncrypt( + 'suffix', + '.pdf' + )}, input: "$prefixSuffixData"}}] }}, { data: '$prefixSuffixData', _id: 0 }).toArray() + `); + expect(s(suffixResults)).to.deep.equal( + s([ + { + data: 'admin_super_456.pdf', + }, + { + data: 'user_regular_789.pdf', + }, + { + data: 'admin_explicit_test.pdf', + }, + ]) + ); + + const substringResults = await shell.executeLineWithJSONResult(` + ${coll}.find({$expr: { $and: [{$encStrContains: {substring: ${maybeEncrypt( + 'substring', + 'user' + )}, input: "$substringData"}}] }}, { data: '$substringData', _id: 0 }).toArray() + `); + expect(s(substringResults)).to.deep.equal( + s([ + { + data: 'user_regular_789.pdf', + }, + { + data: 'admin_user_123.txt', + }, + { + data: 'just_user.txt', + }, + ]) + ); + } + }); + } + ); + }); + context('pre-6.0', function () { skipIfServerVersion(testServer, '>= 6.0'); // FLE2 available on 6.0+ diff --git a/testing/integration-testing-hooks.ts b/testing/integration-testing-hooks.ts index c2101fd25..8d3ee3fd2 100644 --- a/testing/integration-testing-hooks.ts +++ b/testing/integration-testing-hooks.ts @@ -174,11 +174,11 @@ async function getInstalledMongodVersion(): Promise { return version; } -export async function downloadCurrentCryptSharedLibrary(): Promise { +export async function downloadCurrentCryptSharedLibrary(versionSpec?: string): Promise { if (process.platform === 'linux') { - return (await downloadCryptLibrary(`linux-${process.arch.replace('ppc64', 'ppc64le')}` as any)).cryptLibrary; + return (await downloadCryptLibrary(`linux-${process.arch.replace('ppc64', 'ppc64le')}` as any, versionSpec)).cryptLibrary; } - return (await downloadCryptLibrary('host')).cryptLibrary; + return (await downloadCryptLibrary('host', versionSpec)).cryptLibrary; } /** @@ -337,3 +337,13 @@ export function skipIfEnvServerVersion(semverCondition: string): void { skipIfVersion(this, testServerVersion, semverCondition); }); } + +export function sortObjectArray(arr: T): T { + return arr.sort((a, b) => { + const aStr = JSON.stringify(a); + const bStr = JSON.stringify(b); + if (aStr < bStr) return -1; + if (aStr > bStr) return 1; + return 0; + }); +}