]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13672 fixed typo bibucket -> bitbucket typo
author--replace-all <--replace-all>
Wed, 16 Mar 2022 07:48:43 +0000 (08:48 +0100)
committersonartech <sonartech@sonarsource.com>
Wed, 16 Mar 2022 20:03:28 +0000 (20:03 +0000)
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v92/DbVersion92.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v92/MigrateBibucketOrgPluginSettingsToBuiltInSettings.java [deleted file]
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v92/MigrateBitbucketOrgPluginSettingsToBuiltInSettings.java [new file with mode: 0644]
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v92/MigrateBibucketOrgPluginSettingsToBuiltInSettingsTest.java [deleted file]
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v92/MigrateBitbucketOrgPluginSettingsToBuiltInSettingsTest.java [new file with mode: 0644]
server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v92/MigrateBibucketOrgPluginSettingsToBuiltInSettingsTest/schema.sql [deleted file]
server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v92/MigrateBitbucketOrgPluginSettingsToBuiltInSettingsTest/schema.sql [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/almintegrations/ListBitbucketserverProjectsRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/almintegrations/SearchBitbucketcloudReposRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/almintegrations/SearchBitbucketserverReposRequest.java
sonar-ws/src/main/protobuf/ws-alm_integrations.proto

index f5ad5023849a3d18dbf4af598a00f6f8adb797e5..77b146b338b9090251864b26b97ce7b738b56261 100644 (file)
@@ -27,7 +27,7 @@ public class DbVersion92 implements DbVersion {
   public void addSteps(MigrationStepRegistry registry) {
     registry
       .add(6101, "Change size of column 'selection_expression' in 'Portfolios'", AlterSelectionExpressionInPortfoliosTable.class)
-      .add(6102, "Migrate Bitbucket.org authentication plugin settings to built-in authentication settings", MigrateBibucketOrgPluginSettingsToBuiltInSettings.class)
+      .add(6102, "Migrate Bitbucket.org authentication plugin settings to built-in authentication settings", MigrateBitbucketOrgPluginSettingsToBuiltInSettings.class)
       .add(6103, "Create column quick_fix_available in 'issues'", AddQuickFixAvailableColumnInIssuesTable.class)
       .add(6104, "Create qgate_user_permissions Table", CreateQGateUserPermissionsTable.class)
       .add(6105, "Create qgate_group_permissions Table", CreateQGateGroupPermissionsTable.class)
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v92/MigrateBibucketOrgPluginSettingsToBuiltInSettings.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v92/MigrateBibucketOrgPluginSettingsToBuiltInSettings.java
deleted file mode 100644 (file)
index 73b7b72..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2022 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.server.platform.db.migration.version.v92;
-
-import java.sql.SQLException;
-import org.sonar.db.Database;
-import org.sonar.server.platform.db.migration.step.DataChange;
-import org.sonar.server.platform.db.migration.step.Upsert;
-
-public class MigrateBibucketOrgPluginSettingsToBuiltInSettings extends DataChange {
-
-  public MigrateBibucketOrgPluginSettingsToBuiltInSettings(Database db) {
-    super(db);
-  }
-
-  @Override
-  protected void execute(Context context) throws SQLException {
-    Upsert upsert = context.prepareUpsert("update properties set prop_key = ? where prop_key = ?");
-    upsert.setString(1, "sonar.auth.bitbucket.workspaces");
-    upsert.setString(2, "sonar.auth.bitbucket.teams");
-    upsert.execute();
-    upsert.commit();
-  }
-}
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v92/MigrateBitbucketOrgPluginSettingsToBuiltInSettings.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v92/MigrateBitbucketOrgPluginSettingsToBuiltInSettings.java
new file mode 100644 (file)
index 0000000..922bbba
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 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.server.platform.db.migration.version.v92;
+
+import java.sql.SQLException;
+import org.sonar.db.Database;
+import org.sonar.server.platform.db.migration.step.DataChange;
+import org.sonar.server.platform.db.migration.step.Upsert;
+
+public class MigrateBitbucketOrgPluginSettingsToBuiltInSettings extends DataChange {
+
+  public MigrateBitbucketOrgPluginSettingsToBuiltInSettings(Database db) {
+    super(db);
+  }
+
+  @Override
+  protected void execute(Context context) throws SQLException {
+    Upsert upsert = context.prepareUpsert("update properties set prop_key = ? where prop_key = ?");
+    upsert.setString(1, "sonar.auth.bitbucket.workspaces");
+    upsert.setString(2, "sonar.auth.bitbucket.teams");
+    upsert.execute();
+    upsert.commit();
+  }
+}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v92/MigrateBibucketOrgPluginSettingsToBuiltInSettingsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v92/MigrateBibucketOrgPluginSettingsToBuiltInSettingsTest.java
deleted file mode 100644 (file)
index a652e6d..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2022 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.server.platform.db.migration.version.v92;
-
-import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.stream.Collectors;
-import org.junit.Rule;
-import org.junit.Test;
-import org.sonar.core.util.UuidFactory;
-import org.sonar.core.util.UuidFactoryFast;
-import org.sonar.db.CoreDbTester;
-import org.sonar.server.platform.db.migration.step.DataChange;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class MigrateBibucketOrgPluginSettingsToBuiltInSettingsTest {
-
-  private final UuidFactory uuidFactory = UuidFactoryFast.getInstance();
-
-  @Rule
-  public CoreDbTester db = CoreDbTester.createForSchema(MigrateBibucketOrgPluginSettingsToBuiltInSettingsTest.class, "schema.sql");
-
-  private final DataChange underTest = new MigrateBibucketOrgPluginSettingsToBuiltInSettings(db.database());
-
-  @Test
-  public void migration_populate_new_property_based_on_plugin_property() throws SQLException {
-    insertProperty("sonar.auth.bitbucket.teams", "restriction-value");
-    insertProperty("another.property.not.impacted.by.migration", "some value");
-
-    underTest.execute();
-
-    assertPropertyMigratedCorrectly();
-  }
-
-  @Test
-  public void migration_dont_fail_if_plugin_property_is_missing() throws SQLException {
-    underTest.execute();
-
-    String selectSql = "select count(*) as COUNT from properties where PROP_KEY='sonar.auth.bitbucket.workspaces'";
-    assertThat(db.select(selectSql).stream().map(row -> row.get("COUNT")).collect(Collectors.toList()))
-      .containsExactlyInAnyOrder(0L);
-  }
-
-  @Test
-  public void migration_should_be_reentrant() throws SQLException {
-    insertProperty("sonar.auth.bitbucket.teams", "restriction-value");
-    insertProperty("another.property.not.impacted.by.migration", "some value");
-
-    underTest.execute();
-    // re-entrant
-    underTest.execute();
-
-    assertPropertyMigratedCorrectly();
-  }
-
-  private void assertPropertyMigratedCorrectly() {
-    String selectSql = "select TEXT_VALUE from properties where PROP_KEY='sonar.auth.bitbucket.workspaces'";
-    assertThat(db.select(selectSql).stream().map(row -> row.get("TEXT_VALUE")).collect(Collectors.toList()))
-      .containsExactlyInAnyOrder("restriction-value");
-  }
-
-  private void insertProperty(String key, String value) {
-    Map<String, Object> map = new HashMap<>();
-    map.put("UUID", uuidFactory.create());
-    map.put("PROP_KEY", key);
-    map.put("IS_EMPTY", false);
-    map.put("TEXT_VALUE", value);
-    map.put("CREATED_AT", System.currentTimeMillis());
-    db.executeInsert("properties", map);
-  }
-}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v92/MigrateBitbucketOrgPluginSettingsToBuiltInSettingsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v92/MigrateBitbucketOrgPluginSettingsToBuiltInSettingsTest.java
new file mode 100644 (file)
index 0000000..e394495
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 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.server.platform.db.migration.version.v92;
+
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.stream.Collectors;
+import org.junit.Rule;
+import org.junit.Test;
+import org.sonar.core.util.UuidFactory;
+import org.sonar.core.util.UuidFactoryFast;
+import org.sonar.db.CoreDbTester;
+import org.sonar.server.platform.db.migration.step.DataChange;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class MigrateBitbucketOrgPluginSettingsToBuiltInSettingsTest {
+
+  private final UuidFactory uuidFactory = UuidFactoryFast.getInstance();
+
+  @Rule
+  public CoreDbTester db = CoreDbTester.createForSchema(MigrateBitbucketOrgPluginSettingsToBuiltInSettingsTest.class, "schema.sql");
+
+  private final DataChange underTest = new MigrateBitbucketOrgPluginSettingsToBuiltInSettings(db.database());
+
+  @Test
+  public void migration_populate_new_property_based_on_plugin_property() throws SQLException {
+    insertProperty("sonar.auth.bitbucket.teams", "restriction-value");
+    insertProperty("another.property.not.impacted.by.migration", "some value");
+
+    underTest.execute();
+
+    assertPropertyMigratedCorrectly();
+  }
+
+  @Test
+  public void migration_dont_fail_if_plugin_property_is_missing() throws SQLException {
+    underTest.execute();
+
+    String selectSql = "select count(*) as COUNT from properties where PROP_KEY='sonar.auth.bitbucket.workspaces'";
+    assertThat(db.select(selectSql).stream().map(row -> row.get("COUNT")).collect(Collectors.toList()))
+      .containsExactlyInAnyOrder(0L);
+  }
+
+  @Test
+  public void migration_should_be_reentrant() throws SQLException {
+    insertProperty("sonar.auth.bitbucket.teams", "restriction-value");
+    insertProperty("another.property.not.impacted.by.migration", "some value");
+
+    underTest.execute();
+    // re-entrant
+    underTest.execute();
+
+    assertPropertyMigratedCorrectly();
+  }
+
+  private void assertPropertyMigratedCorrectly() {
+    String selectSql = "select TEXT_VALUE from properties where PROP_KEY='sonar.auth.bitbucket.workspaces'";
+    assertThat(db.select(selectSql).stream().map(row -> row.get("TEXT_VALUE")).collect(Collectors.toList()))
+      .containsExactlyInAnyOrder("restriction-value");
+  }
+
+  private void insertProperty(String key, String value) {
+    Map<String, Object> map = new HashMap<>();
+    map.put("UUID", uuidFactory.create());
+    map.put("PROP_KEY", key);
+    map.put("IS_EMPTY", false);
+    map.put("TEXT_VALUE", value);
+    map.put("CREATED_AT", System.currentTimeMillis());
+    db.executeInsert("properties", map);
+  }
+}
diff --git a/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v92/MigrateBibucketOrgPluginSettingsToBuiltInSettingsTest/schema.sql b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v92/MigrateBibucketOrgPluginSettingsToBuiltInSettingsTest/schema.sql
deleted file mode 100644 (file)
index 1fd8dba..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-CREATE TABLE "PROPERTIES"(
-    "UUID" VARCHAR(40) NOT NULL,
-    "PROP_KEY" VARCHAR(512) NOT NULL,
-    "IS_EMPTY" BOOLEAN NOT NULL,
-    "TEXT_VALUE" VARCHAR(4000),
-    "CLOB_VALUE" CLOB,
-    "CREATED_AT" BIGINT NOT NULL,
-    "COMPONENT_UUID" VARCHAR(40),
-    "USER_UUID" VARCHAR(255)
-);
-ALTER TABLE "PROPERTIES" ADD CONSTRAINT "PK_PROPERTIES" PRIMARY KEY("UUID");
-CREATE INDEX "PROPERTIES_KEY" ON "PROPERTIES"("PROP_KEY");
diff --git a/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v92/MigrateBitbucketOrgPluginSettingsToBuiltInSettingsTest/schema.sql b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v92/MigrateBitbucketOrgPluginSettingsToBuiltInSettingsTest/schema.sql
new file mode 100644 (file)
index 0000000..1fd8dba
--- /dev/null
@@ -0,0 +1,12 @@
+CREATE TABLE "PROPERTIES"(
+    "UUID" VARCHAR(40) NOT NULL,
+    "PROP_KEY" VARCHAR(512) NOT NULL,
+    "IS_EMPTY" BOOLEAN NOT NULL,
+    "TEXT_VALUE" VARCHAR(4000),
+    "CLOB_VALUE" CLOB,
+    "CREATED_AT" BIGINT NOT NULL,
+    "COMPONENT_UUID" VARCHAR(40),
+    "USER_UUID" VARCHAR(255)
+);
+ALTER TABLE "PROPERTIES" ADD CONSTRAINT "PK_PROPERTIES" PRIMARY KEY("UUID");
+CREATE INDEX "PROPERTIES_KEY" ON "PROPERTIES"("PROP_KEY");
index 268bc8796951825a727abd4bc444eadeaa33c7de..4e73b4a62a4f6b4f2777ec6e2f1057b24897c379 100644 (file)
@@ -24,7 +24,7 @@ import javax.annotation.Generated;
 /**
  * This is part of the internal API.
  * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_integrations/list_bibucketserver_projects">Further information about this action online (including a response example)</a>
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_integrations/list_bitbucketserver_projects">Further information about this action online (including a response example)</a>
  * @since 8.2
  */
 @Generated("sonar-ws-generator")
index df4a93b512e4db1bdd716bbf9e28ba1308248fc2..c2ae3cd02c4239c882806eefa815f646fd60b0d0 100644 (file)
@@ -24,7 +24,7 @@ import javax.annotation.Generated;
 /**
  * This is part of the internal API.
  * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_integrations/search_bibucketserver_repos">Further information about this action online (including a response example)</a>
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_integrations/search_bitbucketserver_repos">Further information about this action online (including a response example)</a>
  * @since 8.2
  */
 @Generated("sonar-ws-generator")
index d579bcb861f7ca2f9fd2bfb924030af7de241772..e692c1b72370508ccaa05d603e6b21dab086e3aa 100644 (file)
@@ -24,7 +24,7 @@ import javax.annotation.Generated;
 /**
  * This is part of the internal API.
  * This is a POST request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_integrations/search_bibucketserver_repos">Further information about this action online (including a response example)</a>
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_integrations/search_bitbucketserver_repos">Further information about this action online (including a response example)</a>
  * @since 8.2
  */
 @Generated("sonar-ws-generator")
index 465293d54927f37c709aa0d95a281f39bd5c1f95..17ce40389e2ae5ce51bd5c21f056261009e65b5a 100644 (file)
@@ -26,13 +26,13 @@ option java_package = "org.sonarqube.ws";
 option java_outer_classname = "AlmIntegrations";
 option optimize_for = SPEED;
 
-// WS api/alm_integrations/search_bibucketserver_repos
+// WS api/alm_integrations/search_bitbucketserver_repos
 message SearchBitbucketserverReposWsResponse {
   optional bool isLastPage = 1;
   repeated BBSRepo repositories = 2;
 }
 
-// WS api/alm_integrations/search_bibucketcloud_repos
+// WS api/alm_integrations/search_bitbucketcloud_repos
 message SearchBitbucketcloudReposWsResponse {
   optional sonarqube.ws.commons.Paging paging = 1;
   optional bool isLastPage = 2;
@@ -44,7 +44,7 @@ message SearchAzureReposWsResponse {
   repeated AzureRepo repositories = 2;
 }
 
-// WS api/alm_integrations/list_bibucketserver_projects
+// WS api/alm_integrations/list_bitbucketserver_projects
 message ListBitbucketserverProjectsWsResponse {
   repeated AlmProject projects = 1;
 }