diff options
Diffstat (limited to 'server/sonar-db-core/src')
3 files changed, 0 insertions, 77 deletions
diff --git a/server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java b/server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java index 00adc36ac01..16b37ae57c0 100644 --- a/server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java +++ b/server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java @@ -35,7 +35,6 @@ public final class SqTables { public static final Set<String> TABLES = unmodifiableSet(new HashSet<>(asList( "active_rules", "active_rule_parameters", - "alm_app_installs", "alm_settings", "alm_pats", "analysis_properties", @@ -67,11 +66,7 @@ public final class SqTables { "metrics", "new_code_periods", "notifications", - "organizations", - "organization_alm_bindings", - "organization_members", "org_qprofiles", - "org_quality_gates", "permission_templates", "perm_templates_users", "perm_templates_groups", diff --git a/server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreDbTester.java b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreDbTester.java index ae69379a327..f4612282724 100644 --- a/server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreDbTester.java +++ b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/CoreDbTester.java @@ -26,11 +26,9 @@ import org.apache.commons.lang.StringUtils; * Data is truncated between each tests. The schema is created between each test. */ public class CoreDbTester extends AbstractDbTester<CoreTestDb> { - private final DefaultOrganizationTesting defaultOrganizationTesting; private CoreDbTester(CoreTestDb testDb) { super(testDb); - this.defaultOrganizationTesting = new DefaultOrganizationTesting(this); } public static CoreDbTester createForSchema(Class testClass, String filename) { @@ -57,8 +55,4 @@ public class CoreDbTester extends AbstractDbTester<CoreTestDb> { protected void after() { db.stop(); } - - public DefaultOrganizationTesting defaultOrganization() { - return defaultOrganizationTesting; - } } diff --git a/server/sonar-db-core/src/testFixtures/java/org/sonar/db/DefaultOrganizationTesting.java b/server/sonar-db-core/src/testFixtures/java/org/sonar/db/DefaultOrganizationTesting.java deleted file mode 100644 index 3a861e1f61c..00000000000 --- a/server/sonar-db-core/src/testFixtures/java/org/sonar/db/DefaultOrganizationTesting.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.db; - -public class DefaultOrganizationTesting { - private static final String TABLE_ORGANIZATIONS = "organizations"; - private static final String DEFAULT_ORGANIZATION_UUID = "def-org"; - - private final CoreDbTester db; - - public DefaultOrganizationTesting(CoreDbTester db) { - this.db = db; - } - - public String setupDefaultOrganization() { - insertInternalProperty(DEFAULT_ORGANIZATION_UUID); - insertOrganization(DEFAULT_ORGANIZATION_UUID); - return DEFAULT_ORGANIZATION_UUID; - } - - public String insertOrganization() { - insertOrganization(DEFAULT_ORGANIZATION_UUID); - return DEFAULT_ORGANIZATION_UUID; - } - - public void insertOrganization(String uuid) { - db.executeInsert( - TABLE_ORGANIZATIONS, - "UUID", uuid, - "KEE", uuid, - "NAME", uuid, - "CREATED_AT", "1000", - "UPDATED_AT", "1000"); - } - - public String insertInternalProperty() { - insertInternalProperty(DEFAULT_ORGANIZATION_UUID); - return DEFAULT_ORGANIZATION_UUID; - } - - public void insertInternalProperty(String defaultOrganizationUuid) { - db.executeInsert( - "INTERNAL_PROPERTIES", - "KEE", "organization.default", - "IS_EMPTY", "false", - "TEXT_VALUE", defaultOrganizationUuid); - } - -} |