Commit cf7664c0 authored by Andy Wilkinson's avatar Andy Wilkinson

Cope with version not found in Embedded Mongo's Version enum

Closes gh-15311
parent dee8085f
......@@ -156,6 +156,8 @@ public class EmbeddedMongoAutoConfiguration {
return version;
}
}
return Versions.withFeatures(
new GenericVersion(this.embeddedProperties.getVersion()));
}
return Versions.withFeatures(
new GenericVersion(this.embeddedProperties.getVersion()),
......
......@@ -24,6 +24,7 @@ import com.mongodb.MongoClient;
import de.flapdoodle.embed.mongo.config.IMongodConfig;
import de.flapdoodle.embed.mongo.config.Storage;
import de.flapdoodle.embed.mongo.distribution.Feature;
import de.flapdoodle.embed.mongo.distribution.Version;
import org.bson.Document;
import org.junit.After;
import org.junit.Test;
......@@ -67,7 +68,13 @@ public class EmbeddedMongoAutoConfigurationTests {
@Test
public void customVersion() {
assertVersionConfiguration("3.4.15", "3.4.15");
String version = Version.V3_4_15.asInDownloadPath();
assertVersionConfiguration(version, version);
}
@Test
public void customUnknownVersion() {
assertVersionConfiguration("3.4.1", "3.4.1");
}
@Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment