Skip to content

Commit

Permalink
Relax assertion on invalid amazon region for CSFLE tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jyemin committed Apr 12, 2022
1 parent 28264f4 commit 95a2386
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class ClientEncryptionCustomEndpointTest {
// Delay loading this class because one of the expected classes is MongoCryptException, which should only be loaded after we
// determine that we're running on Java 8+ (since MongoCryptException is compiled with Java 8 target version)
private final String wrappedExceptionClassName;
private final String messageContainedInException;
private final String messageContainedInException;

public ClientEncryptionCustomEndpointTest(@SuppressWarnings("unused") final String name,
final BsonDocument masterKey,
Expand Down Expand Up @@ -154,7 +154,7 @@ public static Collection<Object[]> data() {
MongoClientException.class, "java.net.ConnectException", "Connection refused"});
data.add(new Object[]{"invalid amazon region in endpoint",
getDefaultMasterKey().append("endpoint", new BsonString("kms.us-east-2.amazonaws.com")),
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "us-east-1"});
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", null});
data.add(new Object[]{"invalid endpoint host",
getDefaultMasterKey().append("endpoint", new BsonString("example.com")),
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "parse error"});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static Collection<Object[]> data() {
MongoClientException.class, "java.net.ConnectException", "Connection refused"});
data.add(new Object[]{"invalid amazon region in endpoint",
getDefaultMasterKey().append("endpoint", new BsonString("kms.us-east-2.amazonaws.com")),
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "us-east-1"});
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", null});
data.add(new Object[]{"invalid endpoint host",
getDefaultMasterKey().append("endpoint", new BsonString("example.com")),
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "parse error"});
Expand Down

0 comments on commit 95a2386

Please sign in to comment.