Remove remnants of support for Embedded Mongo
See gh-30863 and 7e089a6b
This commit is contained in:
@@ -24,8 +24,6 @@ import com.mongodb.ServerAddress;
|
||||
import org.bson.UuidRepresentation;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.mock.env.MockEnvironment;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
@@ -37,8 +35,6 @@ class MongoPropertiesClientSettingsBuilderCustomizerTests {
|
||||
|
||||
private final MongoProperties properties = new MongoProperties();
|
||||
|
||||
private final MockEnvironment environment = new MockEnvironment();
|
||||
|
||||
@Test
|
||||
void portCanBeCustomized() {
|
||||
this.properties.setPort(12345);
|
||||
@@ -141,16 +137,6 @@ class MongoPropertiesClientSettingsBuilderCustomizerTests {
|
||||
assertMongoCredential(settings.getCredential(), "user", "secret", "test");
|
||||
}
|
||||
|
||||
@Test
|
||||
void uriIsIgnoredInEmbeddedMode() {
|
||||
this.properties.setUri("mongodb://mongo.example.com:1234/mydb");
|
||||
this.environment.setProperty("local.mongo.port", "4000");
|
||||
MongoClientSettings settings = customizeSettings();
|
||||
List<ServerAddress> allAddresses = getAllAddresses(settings);
|
||||
assertThat(allAddresses).hasSize(1);
|
||||
assertServerAddress(allAddresses.get(0), "localhost", 4000);
|
||||
}
|
||||
|
||||
@Test
|
||||
void uriOverridesUsernameAndPassword() {
|
||||
this.properties.setUri("mongodb://127.0.0.1:1234/mydb");
|
||||
@@ -191,7 +177,7 @@ class MongoPropertiesClientSettingsBuilderCustomizerTests {
|
||||
|
||||
private MongoClientSettings customizeSettings() {
|
||||
MongoClientSettings.Builder settings = MongoClientSettings.builder();
|
||||
new MongoPropertiesClientSettingsBuilderCustomizer(this.properties, this.environment).customize(settings);
|
||||
new MongoPropertiesClientSettingsBuilderCustomizer(this.properties).customize(settings);
|
||||
return settings.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user