Skip to content
Snippets Groups Projects
Commit 8f860e5f authored by Vincent Massol's avatar Vincent Massol
Browse files

[Misc] Make it work when the MySQL or MariaDB DB docker tag is "latest"

parent b3807474
No related branches found
No related tags found
No related merge requests found
...@@ -174,8 +174,14 @@ private boolean isMySQL55x(TestConfiguration testConfiguration) ...@@ -174,8 +174,14 @@ private boolean isMySQL55x(TestConfiguration testConfiguration)
private boolean isMySQL8xPlus(TestConfiguration testConfiguration) private boolean isMySQL8xPlus(TestConfiguration testConfiguration)
{ {
return (testConfiguration.getDatabaseTag() != null && extractMajor(testConfiguration.getDatabaseTag()) >= 8) boolean isMySQL8xPlus;
|| (extractMajor(MySQLContainer.DEFAULT_TAG) >= 8 && testConfiguration.getDatabaseTag() == null); if (testConfiguration.getDatabaseTag() != null) {
isMySQL8xPlus = testConfiguration.getDatabaseTag().equals("latest")
|| extractMajor(testConfiguration.getDatabaseTag()) >= 8;
} else {
isMySQL8xPlus = extractMajor(MySQLContainer.DEFAULT_TAG) >= 8;
}
return isMySQL8xPlus;
} }
private int extractMajor(String version) private int extractMajor(String version)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment