Skip to content

Commit

Permalink
Fix ClusterFixture#hasEncryptionTestsEnabled to correctly detect env …
Browse files Browse the repository at this point in the history
…vars (#1343)

JAVA-5311
  • Loading branch information
jyemin committed Mar 15, 2024
1 parent 6280158 commit c4e3cb1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ public static List<Integer> getVersionList(final String versionString) {
}

public static boolean hasEncryptionTestsEnabled() {
List<String> requiredSystemProperties = asList("awsAccessKeyId", "awsSecretAccessKey", "azureTenantId", "azureClientId",
"azureClientSecret", "gcpEmail", "gcpPrivateKey", "tmpAwsAccessKeyId", "tmpAwsSecretAccessKey", "tmpAwsSessionToken");
List<String> requiredSystemProperties = asList("AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AZURE_TENANT_ID", "AZURE_CLIENT_ID",
"AZURE_CLIENT_SECRET", "GCP_EMAIL", "GCP_PRIVATE_KEY", "AWS_TEMP_ACCESS_KEY_ID", "AWS_TEMP_SECRET_ACCESS_KEY",
"AWS_TEMP_SESSION_TOKEN");
return requiredSystemProperties.stream()
.map(name -> getEnv("org.mongodb.test." + name, ""))
.map(name -> getEnv(name, ""))
.filter(s -> !s.isEmpty())
.count() == requiredSystemProperties.size();
}
Expand Down

0 comments on commit c4e3cb1

Please sign in to comment.