diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2019-07-02 23:12:14 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-07-10 08:36:52 +0200 |
commit | 983f593231da12bd64d9df23c18d4f2c7aaa6da1 (patch) | |
tree | 7cb059b67a55896fdee6a845a33cd1b7abcf6193 /server/sonar-server/src/test | |
parent | ae5d2b804c69e4cd19ec13880b913881f620e518 (diff) | |
download | sonarqube-983f593231da12bd64d9df23c18d4f2c7aaa6da1.tar.gz sonarqube-983f593231da12bd64d9df23c18d4f2c7aaa6da1.zip |
SONAR-12246 remove MySQL dialect
Diffstat (limited to 'server/sonar-server/src/test')
3 files changed, 10 insertions, 16 deletions
diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/metadata/EsDbCompatibilityImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/metadata/EsDbCompatibilityImplTest.java index 66001567d87..3ba78fc31aa 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/metadata/EsDbCompatibilityImplTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/metadata/EsDbCompatibilityImplTest.java @@ -51,15 +51,15 @@ public class EsDbCompatibilityImplTest { @Test public void hasSameDbVendor_is_true_if_values_match() { - prepareDb("mysql"); - prepareEs("mysql"); + prepareDb("mssql"); + prepareEs("mssql"); assertThat(underTest.hasSameDbVendor()).isTrue(); } @Test public void hasSameDbVendor_is_false_if_values_dont_match() { - prepareDb("mysql"); + prepareDb("mssql"); prepareEs("postgres"); assertThat(underTest.hasSameDbVendor()).isFalse(); @@ -67,23 +67,23 @@ public class EsDbCompatibilityImplTest { @Test public void hasSameDbVendor_is_false_if_value_is_absent_from_es() { - prepareDb("mysql"); + prepareDb("mssql"); assertThat(underTest.hasSameDbVendor()).isFalse(); } @Test public void markAsCompatible_db_metadata_in_es() { - prepareDb("mysql"); + prepareDb("mssql"); underTest.markAsCompatible(); - assertThat(metadataIndex.getDbVendor()).hasValue("mysql"); + assertThat(metadataIndex.getDbVendor()).hasValue("mssql"); } @Test public void markAsCompatible_updates_db_metadata_in_es() { - prepareEs("mysql"); + prepareEs("mssql"); prepareDb("postgres"); underTest.markAsCompatible(); diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationTest.java index 460b6576898..5fd2bbdf847 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/db/migration/AutoDbMigrationTest.java @@ -33,7 +33,6 @@ import org.sonar.db.DbSession; import org.sonar.db.dialect.Dialect; import org.sonar.db.dialect.H2; import org.sonar.db.dialect.MsSql; -import org.sonar.db.dialect.MySql; import org.sonar.db.dialect.Oracle; import org.sonar.db.dialect.PostgreSql; import org.sonar.server.platform.DefaultServerUpgradeStatus; @@ -82,11 +81,6 @@ public class AutoDbMigrationTest { } @Test - public void start_runs_MigrationEngine_on_mysql_if_fresh_install() { - start_runs_MigrationEngine_for_dialect_if_fresh_install(new MySql()); - } - - @Test public void start_runs_MigrationEngine_on_postgre_if_fresh_install() { start_runs_MigrationEngine_for_dialect_if_fresh_install(new PostgreSql()); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java index 918fb5af4bf..1a20d2e87fe 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java @@ -36,7 +36,7 @@ import org.sonar.core.platform.PluginInfo; import org.sonar.core.platform.PluginRepository; import org.sonar.db.DbClient; import org.sonar.db.dialect.H2; -import org.sonar.db.dialect.MySql; +import org.sonar.db.dialect.PostgreSql; import org.sonar.server.branch.BranchFeatureRule; import org.sonar.server.organization.DefaultOrganizationProvider; import org.sonar.server.organization.TestDefaultOrganizationProvider; @@ -212,7 +212,7 @@ public class GlobalActionTest { @Test public void return_if_production_database_or_not() { init(); - when(dbClient.getDatabase().getDialect()).thenReturn(new MySql()); + when(dbClient.getDatabase().getDialect()).thenReturn(new PostgreSql()); assertJson(call()).isSimilarTo("{" + " \"productionDatabase\": true" + @@ -287,7 +287,7 @@ public class GlobalActionTest { .build() }); when(server.getVersion()).thenReturn("6.2"); - when(dbClient.getDatabase().getDialect()).thenReturn(new MySql()); + when(dbClient.getDatabase().getDialect()).thenReturn(new PostgreSql()); when(webServer.isStandalone()).thenReturn(true); when(editionProvider.get()).thenReturn(Optional.of(EditionProvider.Edition.COMMUNITY)); |