Skip to content

Commit fe331f9

Browse files
authored
CSHARP-5343: Encryption-related tests failing locally (#1564)
1 parent b8af424 commit fe331f9

File tree

15 files changed

+61
-117
lines changed

15 files changed

+61
-117
lines changed

evergreen/export-libmongocrypt-path.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.

evergreen/run-csfle-azure-tests.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,4 @@ echo "Running Azure Credential Acquisition Test"
2222
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
2323
export CSFLE_AZURE_KMS_TESTS_ENABLED=true
2424

25-
. ./evergreen/export-libmongocrypt-path.sh
26-
2725
./build.sh --target=TestCsfleWithAzureKms

evergreen/run-csfle-gcp-tests.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,4 @@ echo "Running GCP Credential Acquisition Test"
1515
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
1616
export CSFLE_GCP_KMS_TESTS_ENABLED=true
1717

18-
. ./evergreen/export-libmongocrypt-path.sh
19-
2018
./build.sh --target=TestCsfleWithGcpKms

evergreen/run-serverless-tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ else
4747
fi
4848

4949
source ${DRIVERS_TOOLS}/.evergreen/serverless/secrets-export.sh
50+
if [ -f "$DRIVERS_TOOLS/.evergreen/csfle/secrets-export.sh" ]; then
51+
source $DRIVERS_TOOLS/.evergreen/csfle/secrets-export.sh
52+
fi
5053

5154
# Assume "mongodb+srv" protocol
5255
export MONGODB_URI="mongodb+srv://${SERVERLESS_ATLAS_USER}:${SERVERLESS_ATLAS_PASSWORD}@${SERVERLESS_URI:14}"

evergreen/run-tests.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,7 @@ if [ -f "$DRIVERS_TOOLS/.evergreen/csfle/secrets-export.sh" ]; then
146146
source $DRIVERS_TOOLS/.evergreen/csfle/secrets-export.sh
147147
fi
148148

149-
. ./evergreen/export-libmongocrypt-path.sh
150-
151149
if [[ "$TARGET" =~ "SmokeTests" ]]; then
152-
unset LIBMONGOCRYPT_PATH
153150
# add/adjust nuget.config pointing to myget so intermediate versions could be restored
154151
if [ -f "./nuget.config" ]; then
155152
echo "Adding myget into nuget.config"

src/MongoDB.Driver.Encryption/MongoDB.Driver.Encryption.csproj

Lines changed: 58 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -13,100 +13,102 @@
1313
<NoWarn>CA1060;CA2101;CA1307;SYSLIB0022;SYSLIB0004</NoWarn>
1414
</PropertyGroup>
1515

16-
<PropertyGroup>
17-
<LibMongoCryptMacOsSourceUrl>https://mciuploads.s3.amazonaws.com/libmongocrypt-release/macos/r1.11/9a88ac5698e8e3ffcd6580b98c247f0126f26c40/libmongocrypt.tar.gz</LibMongoCryptMacOsSourceUrl>
18-
<LibMongoCryptUbuntuX64SourceUrl>https://mciuploads.s3.amazonaws.com/libmongocrypt-release/ubuntu1804-64/r1.11/9a88ac5698e8e3ffcd6580b98c247f0126f26c40/libmongocrypt.tar.gz</LibMongoCryptUbuntuX64SourceUrl>
19-
<LibMongoCryptUbuntuARM64SourceUrl>https://mciuploads.s3.amazonaws.com/libmongocrypt-release/ubuntu1804-arm64/r1.11/9a88ac5698e8e3ffcd6580b98c247f0126f26c40/libmongocrypt.tar.gz</LibMongoCryptUbuntuARM64SourceUrl>
20-
<LibMongoCryptAlpineSourceUrl>https://mciuploads.s3.amazonaws.com/libmongocrypt-release/alpine-arm64-earthly/r1.11/9a88ac5698e8e3ffcd6580b98c247f0126f26c40/libmongocrypt.tar.gz</LibMongoCryptAlpineSourceUrl>
21-
<LibMongoCryptWindowsSourceUrl>https://mciuploads.s3.amazonaws.com/libmongocrypt-release/windows-test/r1.11/9a88ac5698e8e3ffcd6580b98c247f0126f26c40/libmongocrypt.tar.gz</LibMongoCryptWindowsSourceUrl>
22-
</PropertyGroup>
16+
<Target Name="DownloadNativeBinaries_MacOS" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/runtimes/osx/native/libmongocrypt.dylib')">
17+
<PropertyGroup>
18+
<LibMongoCryptSourceUrl>https://mciuploads.s3.amazonaws.com/libmongocrypt-release/macos/r1.11/9a88ac5698e8e3ffcd6580b98c247f0126f26c40/libmongocrypt.tar.gz</LibMongoCryptSourceUrl>
19+
<LibMongoCryptSourcePath>lib/libmongocrypt.dylib</LibMongoCryptSourcePath>
20+
<LibMongoCryptPackagePath>runtimes/osx/native</LibMongoCryptPackagePath>
21+
</PropertyGroup>
2322

24-
<Target Name="DownloadNativeBinaries_linux_x64" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/linux/x64/libmongocrypt.so')">
23+
<MSBuild Projects ="$(MSBuildProjectFullPath)"
24+
Properties="TargetFramework=once;LibMongoCryptSourceUrl=$(LibMongoCryptSourceUrl);LibMongoCryptSourcePath=$(LibMongoCryptSourcePath);LibMongoCryptPackagePath=$(LibMongoCryptPackagePath)"
25+
Targets="DownloadNativeBinary" />
26+
</Target>
27+
28+
<Target Name="DownloadNativeBinaries_UbuntuX64" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/runtimes/linux/native/x64/libmongocrypt.so')">
2529
<PropertyGroup>
26-
<IntermediateOutputPathLSF>$(IntermediateOutputPath.Replace('\', '/'))</IntermediateOutputPathLSF>
30+
<LibMongoCryptSourceUrl>https://mciuploads.s3.amazonaws.com/libmongocrypt-release/ubuntu1804-64/r1.11/9a88ac5698e8e3ffcd6580b98c247f0126f26c40/libmongocrypt.tar.gz</LibMongoCryptSourceUrl>
31+
<LibMongoCryptSourcePath>nocrypto/lib/libmongocrypt.so</LibMongoCryptSourcePath>
32+
<LibMongoCryptPackagePath>runtimes/linux/native/x64</LibMongoCryptPackagePath>
2733
</PropertyGroup>
28-
<DownloadFile
29-
SourceUrl="$(LibMongoCryptUbuntuX64SourceUrl)"
30-
DestinationFolder="$(IntermediateOutputPathLSF)linux/x64"/>
31-
<Exec Command="tar -zxvf $(IntermediateOutputPathLSF)linux/x64/libmongocrypt.tar.gz --strip-components=2 -C $(IntermediateOutputPathLSF)linux/x64 nocrypto/lib/libmongocrypt.so" />
32-
<Copy SourceFiles="$(IntermediateOutputPathLSF)linux/x64/libmongocrypt.so" DestinationFolder="$(MSBuildProjectDirectory)/linux/x64" Retries="5" RetryDelayMilliseconds="100"/>
34+
35+
<MSBuild Projects ="$(MSBuildProjectFullPath)"
36+
Properties="TargetFramework=once;LibMongoCryptSourceUrl=$(LibMongoCryptSourceUrl);LibMongoCryptSourcePath=$(LibMongoCryptSourcePath);LibMongoCryptPackagePath=$(LibMongoCryptPackagePath)"
37+
Targets="DownloadNativeBinary" />
3338
</Target>
3439

35-
<Target Name="DownloadNativeBinaries_linux_arm64" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/linux/arm64/libmongocrypt.so')">
40+
<Target Name="DownloadNativeBinaries_UbuntuARM64" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/runtimes/linux/native/arm64/libmongocrypt.so')">
3641
<PropertyGroup>
37-
<IntermediateOutputPathLSF>$(IntermediateOutputPath.Replace('\', '/'))</IntermediateOutputPathLSF>
42+
<LibMongoCryptSourceUrl>https://mciuploads.s3.amazonaws.com/libmongocrypt-release/ubuntu1804-arm64/r1.11/9a88ac5698e8e3ffcd6580b98c247f0126f26c40/libmongocrypt.tar.gz</LibMongoCryptSourceUrl>
43+
<LibMongoCryptSourcePath>nocrypto/lib/libmongocrypt.so</LibMongoCryptSourcePath>
44+
<LibMongoCryptPackagePath>runtimes/linux/native/arm64</LibMongoCryptPackagePath>
3845
</PropertyGroup>
39-
<DownloadFile
40-
SourceUrl="$(LibMongoCryptUbuntuARM64SourceUrl)"
41-
DestinationFolder="$(IntermediateOutputPathLSF)linux/arm64"/>
42-
<Exec Command="tar -zxvf $(IntermediateOutputPathLSF)linux/arm64/libmongocrypt.tar.gz --strip-components=2 -C $(IntermediateOutputPathLSF)linux/arm64 nocrypto/lib/libmongocrypt.so" />
43-
<Copy SourceFiles="$(IntermediateOutputPathLSF)linux/arm64/libmongocrypt.so" DestinationFolder="$(MSBuildProjectDirectory)/linux/arm64" Retries="5" RetryDelayMilliseconds="100"/>
46+
47+
<MSBuild Projects ="$(MSBuildProjectFullPath)"
48+
Properties="TargetFramework=once;LibMongoCryptSourceUrl=$(LibMongoCryptSourceUrl);LibMongoCryptSourcePath=$(LibMongoCryptSourcePath);LibMongoCryptPackagePath=$(LibMongoCryptPackagePath)"
49+
Targets="DownloadNativeBinary" />
4450
</Target>
4551

46-
<Target Name="DownloadNativeBinaries_macos" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/macos/libmongocrypt.dylib')">
52+
<Target Name="DownloadNativeBinaries_Alpine" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/runtimes/linux/native/alpine/libmongocrypt.so')">
4753
<PropertyGroup>
48-
<IntermediateOutputPathLSF>$(IntermediateOutputPath.Replace('\', '/'))</IntermediateOutputPathLSF>
54+
<LibMongoCryptSourceUrl>https://mciuploads.s3.amazonaws.com/libmongocrypt-release/alpine-arm64-earthly/r1.11/9a88ac5698e8e3ffcd6580b98c247f0126f26c40/libmongocrypt.tar.gz</LibMongoCryptSourceUrl>
55+
<LibMongoCryptSourcePath>nocrypto/lib/libmongocrypt.so</LibMongoCryptSourcePath>
56+
<LibMongoCryptPackagePath>runtimes/linux/native/alpine</LibMongoCryptPackagePath>
4957
</PropertyGroup>
50-
<DownloadFile
51-
SourceUrl="$(LibMongoCryptMacOsSourceUrl)"
52-
DestinationFolder="$(IntermediateOutputPathLSF)macos"/>
53-
<Exec Command="tar -zxvf $(IntermediateOutputPathLSF)macos/libmongocrypt.tar.gz --strip-components=1 -C $(IntermediateOutputPathLSF)macos lib/libmongocrypt.dylib" />
54-
<Copy SourceFiles="$(IntermediateOutputPathLSF)macos/libmongocrypt.dylib" DestinationFolder="$(MSBuildProjectDirectory)/macos" Retries="5" RetryDelayMilliseconds="100"/>
58+
59+
<MSBuild Projects ="$(MSBuildProjectFullPath)"
60+
Properties="TargetFramework=once;LibMongoCryptSourceUrl=$(LibMongoCryptSourceUrl);LibMongoCryptSourcePath=$(LibMongoCryptSourcePath);LibMongoCryptPackagePath=$(LibMongoCryptPackagePath)"
61+
Targets="DownloadNativeBinary" />
5562
</Target>
5663

57-
<Target Name="DownloadNativeBinaries_windows" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/windows/mongocrypt.dll')">
64+
<Target Name="DownloadNativeBinaries_Windows" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/runtimes/win/native/mongocrypt.dll')">
5865
<PropertyGroup>
59-
<IntermediateOutputPathLSF>$(IntermediateOutputPath.Replace('\', '/'))</IntermediateOutputPathLSF>
66+
<LibMongoCryptSourceUrl>https://mciuploads.s3.amazonaws.com/libmongocrypt-release/windows-test/r1.11/9a88ac5698e8e3ffcd6580b98c247f0126f26c40/libmongocrypt.tar.gz</LibMongoCryptSourceUrl>
67+
<LibMongoCryptSourcePath>bin/mongocrypt.dll</LibMongoCryptSourcePath>
68+
<LibMongoCryptPackagePath>runtimes/win/native</LibMongoCryptPackagePath>
6069
</PropertyGroup>
61-
<DownloadFile
62-
SourceUrl="$(LibMongoCryptWindowsSourceUrl)"
63-
DestinationFolder="$(IntermediateOutputPathLSF)windows"/>
64-
<Exec Command="tar -zxvf $(IntermediateOutputPathLSF)windows/libmongocrypt.tar.gz --strip-components=1 -C $(IntermediateOutputPathLSF)windows bin/mongocrypt.dll" />
65-
<Copy SourceFiles="$(IntermediateOutputPathLSF)windows/mongocrypt.dll" DestinationFolder="$(MSBuildProjectDirectory)/windows" Retries="5" RetryDelayMilliseconds="100"/>
70+
71+
<MSBuild Projects ="$(MSBuildProjectFullPath)"
72+
Properties="TargetFramework=once;LibMongoCryptSourceUrl=$(LibMongoCryptSourceUrl);LibMongoCryptSourcePath=$(LibMongoCryptSourcePath);LibMongoCryptPackagePath=$(LibMongoCryptPackagePath)"
73+
Targets="DownloadNativeBinary" />
6674
</Target>
6775

68-
<Target Name="DownloadNativeBinaries_Alpine" BeforeTargets="BeforeBuild" Condition="!Exists('$(MSBuildProjectDirectory)/linux/alpine/libmongocrypt.so')">
76+
<Target Name="DownloadNativeBinary">
6977
<PropertyGroup>
70-
<IntermediateOutputPathLSF>$(IntermediateOutputPath.Replace('\', '/'))</IntermediateOutputPathLSF>
78+
<LibMongoCryptTmpPath>$(IntermediateOutputPath.Replace('\', '/'))$(LibMongoCryptPackagePath)</LibMongoCryptTmpPath>
7179
</PropertyGroup>
72-
<DownloadFile
73-
SourceUrl="$(LibMongoCryptAlpineSourceUrl)"
74-
DestinationFolder="$(IntermediateOutputPathLSF)linux/alpine"/>
75-
<Exec Command="tar -zxvf $(IntermediateOutputPathLSF)linux/alpine/libmongocrypt.tar.gz --strip-components=2 -C $(IntermediateOutputPathLSF)linux/alpine nocrypto/lib/libmongocrypt.so" />
76-
<Copy SourceFiles="$(IntermediateOutputPathLSF)linux/alpine/libmongocrypt.so" DestinationFolder="$(MSBuildProjectDirectory)/linux/alpine" Retries="5" RetryDelayMilliseconds="100"/>
80+
<DownloadFile SourceUrl="$(LibMongoCryptSourceUrl)" DestinationFolder="$(LibMongoCryptTmpPath)"/>
81+
<Exec Command="tar -zxvf $(LibMongoCryptTmpPath)/libmongocrypt.tar.gz -C $(LibMongoCryptTmpPath) $(LibMongoCryptSourcePath)" />
82+
<Copy SourceFiles="$(LibMongoCryptTmpPath)/$(LibMongoCryptSourcePath)" DestinationFolder="$(MSBuildProjectDirectory)/$(LibMongoCryptPackagePath)" />
83+
<RemoveDir Directories="$(LibMongoCryptTmpPath)" />
7784
</Target>
7885

7986
<ItemGroup>
80-
<Content Include="$(MSBuildProjectDirectory)/linux/x64/libmongocrypt.so">
81-
<Link>libmongocrypt\linux-x64\libmongocrypt.so</Link>
87+
<Content Include="$(MSBuildProjectDirectory)/runtimes/osx/native/libmongocrypt.dylib">
8288
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
8389
<Pack>true</Pack>
84-
<PackagePath>runtimes\linux\native\x64</PackagePath>
90+
<PackagePath>runtimes\osx\native</PackagePath>
8591
</Content>
8692

87-
<Content Include="$(MSBuildProjectDirectory)/linux/arm64/libmongocrypt.so">
88-
<Link>libmongocrypt\linux-arm64\libmongocrypt.so</Link>
93+
<Content Include="$(MSBuildProjectDirectory)/runtimes/linux/native/x64/libmongocrypt.so">
8994
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
9095
<Pack>true</Pack>
91-
<PackagePath>runtimes\linux\native\arm64</PackagePath>
96+
<PackagePath>runtimes\linux\native\x64</PackagePath>
9297
</Content>
9398

94-
<Content Include="$(MSBuildProjectDirectory)/linux/alpine/libmongocrypt.so">
95-
<Link>libmongocrypt\linux-alpine\libmongocrypt.so</Link>
99+
<Content Include="$(MSBuildProjectDirectory)/runtimes/linux/native/arm64/libmongocrypt.so">
96100
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
97101
<Pack>true</Pack>
98-
<PackagePath>runtimes\linux\native\alpine</PackagePath>
102+
<PackagePath>runtimes\linux\native\arm64</PackagePath>
99103
</Content>
100104

101-
<Content Include="$(MSBuildProjectDirectory)/macos/libmongocrypt.dylib">
102-
<Link>libmongocrypt\macos\libmongocrypt.dylib</Link>
105+
<Content Include="$(MSBuildProjectDirectory)/runtimes/linux/native/alpine/libmongocrypt.so">
103106
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
104107
<Pack>true</Pack>
105-
<PackagePath>runtimes\osx\native</PackagePath>
108+
<PackagePath>runtimes\linux\native\alpine</PackagePath>
106109
</Content>
107110

108-
<Content Include="$(MSBuildProjectDirectory)/windows/mongocrypt.dll">
109-
<Link>libmongocrypt\windows\mongocrypt.dll</Link>
111+
<Content Include="$(MSBuildProjectDirectory)/runtimes/win/native/mongocrypt.dll">
110112
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
111113
<Pack>true</Pack>
112114
<PackagePath>runtimes\win\native</PackagePath>

tests/MongoDB.Driver.Encryption.Tests/BasicTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
using System.Text;
2525
using FluentAssertions;
2626
using Xunit.Abstractions;
27-
using MongoDB.TestHelpers.XunitExtensions;
2827

2928
namespace MongoDB.Driver.Encryption.Tests
3029
{
@@ -36,7 +35,6 @@ public class BasicTests
3635

3736
public BasicTests(ITestOutputHelper output)
3837
{
39-
RequireEnvironment.Check().EnvironmentVariable("LIBMONGOCRYPT_PATH", allowEmpty: false);
4038
_output = output;
4139
}
4240

tests/MongoDB.Driver.Examples/ClientEncryptionExamples.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
using MongoDB.Driver.Core.Misc;
2121
using MongoDB.Driver.Core.TestHelpers.XunitExtensions;
2222
using MongoDB.Driver.Encryption;
23-
using MongoDB.TestHelpers.XunitExtensions;
2423
using Xunit;
2524
using Xunit.Abstractions;
2625

@@ -43,7 +42,6 @@ public ClientEncryptionExamples(ITestOutputHelper output)
4342
public void ClientSideEncryptionSimpleTour()
4443
{
4544
RequireServer.Check().Supports(Feature.ClientSideEncryption);
46-
RequireEnvironment.Check().EnvironmentVariable("LIBMONGOCRYPT_PATH", allowEmpty: false);
4745

4846
var localMasterKey = Convert.FromBase64String(LocalMasterKey);
4947

@@ -77,7 +75,6 @@ public void ClientSideEncryptionSimpleTour()
7775
public void ClientSideEncryptionAutoEncryptionSettingsTour()
7876
{
7977
RequireServer.Check().Supports(Feature.ClientSideEncryption);
80-
RequireEnvironment.Check().EnvironmentVariable("LIBMONGOCRYPT_PATH", allowEmpty: false);
8178

8279
var localMasterKey = Convert.FromBase64String(LocalMasterKey);
8380

tests/MongoDB.Driver.Examples/ClientSideEncryption2Examples.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
using MongoDB.Driver.Core.TestHelpers.XunitExtensions;
2424
using MongoDB.Driver.Encryption;
2525
using MongoDB.Driver.Tests;
26-
using MongoDB.TestHelpers.XunitExtensions;
2726
using Xunit;
2827

2928
namespace MongoDB.Driver.Examples
@@ -38,7 +37,6 @@ public class ClientSideEncryption2Examples
3837
public void FLE2AutomaticEncryption()
3938
{
4039
RequireServer.Check().Supports(Feature.Csfle2).ClusterTypes(ClusterType.ReplicaSet, ClusterType.Sharded, ClusterType.LoadBalanced);
41-
RequireEnvironment.Check().EnvironmentVariable("LIBMONGOCRYPT_PATH", allowEmpty: false);
4240

4341
var unencryptedClient = DriverTestConfiguration.Client;
4442

tests/MongoDB.Driver.Examples/ExplicitEncryptionExamples.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
using MongoDB.Driver.Core.Misc;
2121
using MongoDB.Driver.Core.TestHelpers.XunitExtensions;
2222
using MongoDB.Driver.Encryption;
23-
using MongoDB.TestHelpers.XunitExtensions;
2423
using Xunit;
2524
using Xunit.Abstractions;
2625

@@ -43,7 +42,6 @@ public ExplicitEncryptionExamples(ITestOutputHelper output)
4342
public void ClientSideExplicitEncryptionAndDecryptionTour()
4443
{
4544
RequireServer.Check().Supports(Feature.ClientSideEncryption);
46-
RequireEnvironment.Check().EnvironmentVariable("LIBMONGOCRYPT_PATH", allowEmpty: false);
4745

4846
var localMasterKey = Convert.FromBase64String(LocalMasterKey);
4947

@@ -94,7 +92,6 @@ public void ClientSideExplicitEncryptionAndDecryptionTour()
9492
public void ClientSideExplicitEncryptionAndAutoDecryptionTour()
9593
{
9694
RequireServer.Check().Supports(Feature.ClientSideEncryption);
97-
RequireEnvironment.Check().EnvironmentVariable("LIBMONGOCRYPT_PATH", allowEmpty: false);
9895

9996
var localMasterKey = Convert.FromBase64String(LocalMasterKey);
10097

tests/MongoDB.Driver.Tests/Encryption/AutoEncryptionTests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public AutoEncryptionTests(ITestOutputHelper testOutputHelper)
5050
public void CryptClient_should_be_initialized([Values(false, true)] bool withAutoEncryption)
5151
{
5252
RequireServer.Check().Supports(Feature.ClientSideEncryption);
53-
RequireEnvironment.Check().EnvironmentVariable("LIBMONGOCRYPT_PATH", allowEmpty: false);
5453

5554
using (var client = GetClient(withAutoEncryption))
5655
{
@@ -72,7 +71,6 @@ public void CryptClient_should_be_initialized([Values(false, true)] bool withAut
7271
public async Task Mongocryptd_should_be_initialized_when_auto_encryption([Values(false, true)] bool withAutoEncryption, [Values(false, true)] bool async)
7372
{
7473
RequireServer.Check().Supports(Feature.ClientSideEncryption);
75-
RequireEnvironment.Check().EnvironmentVariable("LIBMONGOCRYPT_PATH", allowEmpty: false);
7674

7775
using (var client = GetClient(
7876
withAutoEncryption,
@@ -111,8 +109,6 @@ public void Shared_library_should_be_loaded_when_CRYPT_SHARED_LIB_PATH_is_set()
111109
{
112110
RequireServer.Check().Supports(Feature.ClientSideEncryption);
113111
RequireEnvironment.Check().EnvironmentVariable("CRYPT_SHARED_LIB_PATH", isDefined: true, allowEmpty: false);
114-
RequireEnvironment.Check().EnvironmentVariable("LIBMONGOCRYPT_PATH", allowEmpty: false);
115-
116112
Ensure.That(File.Exists(Environment.GetEnvironmentVariable("CRYPT_SHARED_LIB_PATH")), "CRYPT_SHARED_LIB_PATH should exist.");
117113

118114
using (var client = GetClient(withAutoEncryption: true))

tests/MongoDB.Driver.Tests/Encryption/ClientEncryptionTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,6 @@ public async Task RewrapManyDataKey_should_correctly_handle_input_arguments()
387387
// private methods
388388
private ClientEncryption CreateSubject(IMongoClient client = null)
389389
{
390-
RequireEnvironment.Check().EnvironmentVariable("LIBMONGOCRYPT_PATH", allowEmpty: false);
391-
392390
var clientEncryptionOptions = new ClientEncryptionOptions(
393391
client ?? DriverTestConfiguration.Client,
394392
__keyVaultCollectionNamespace,

tests/MongoDB.Driver.Tests/Specifications/UnifiedTestSpecRunner.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ public void ClientSideEncryption(JsonDrivenTestCase testCase)
5858
RequireKmsMock();
5959
}
6060

61-
RequireEnvironment.Check().EnvironmentVariable("LIBMONGOCRYPT_PATH");
62-
6361
Run(testCase);
6462
}
6563

0 commit comments

Comments
 (0)