From 00ed34a3c9900665ff62985abbb935f3260feb99 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Thu, 4 Sep 2014 15:41:11 +0200 Subject: [PATCH] SONAR-5589 Create column projects.authorization_updated_at --- .../db/migrations/DatabaseMigrations.java | 20 ++---- ...ojectsAuthorizationUpdatedAtMigration.java | 65 +++++++++++++++++++ ...tsAuthorizationUpdatedAtMigrationTest.java | 58 +++++++++++++++++ .../ComponentDaoTest/insert-result.xml | 2 +- .../ComponentDaoTest/multi-modules.xml | 10 +-- .../persistence/ComponentDaoTest/shared.xml | 8 +-- .../after.xml | 20 ++++++ .../before.xml | 20 ++++++ .../schema.sql | 18 +++++ ...dd_authorization_updated_at_to_projects.rb | 31 +++++++++ ...nsert_projects_authorization_updated_at.rb | 32 +++++++++ .../index/DefaultResourcePersisterTest.java | 21 +++--- .../batch/index/ResourceKeyMigrationTest.java | 2 +- .../core/persistence/DatabaseVersion.java | 2 +- .../org/sonar/core/persistence/rows-h2.sql | 2 + .../org/sonar/core/persistence/schema-h2.ddl | 3 +- .../org/sonar/core/user/AuthorDaoTest.java | 4 +- ...resources_without_last_snapshot-result.xml | 6 +- ...isable_resources_without_last_snapshot.xml | 6 +- .../shouldDeleteAbortedBuilds-result.xml | 4 +- .../shouldDeleteAbortedBuilds.xml | 4 +- ...oricalDataOfDirectoriesAndFiles-result.xml | 6 +- ...eteHistoricalDataOfDirectoriesAndFiles.xml | 6 +- .../PurgeDaoTest/shouldDeleteProject.xml | 10 +-- .../shouldPurgeProject-result.xml | 3 +- .../purge/PurgeDaoTest/shouldPurgeProject.xml | 3 +- ...should_delete_all_closed_issues-result.xml | 2 +- .../should_delete_all_closed_issues.xml | 2 +- ...should_delete_old_closed_issues-result.xml | 2 +- .../should_delete_old_closed_issues.xml | 2 +- ...g-ghost-projects-and-technical-project.xml | 12 ++-- .../core/resource/ResourceDaoTest/fixture.xml | 8 +-- .../getResources_exclude_disabled.xml | 4 +- .../get_last_snapshot_by_resource_id.xml | 28 ++------ .../ResourceDaoTest/insert-result.xml | 6 +- ...nent_ids_for_secured_project_for_group.xml | 8 +-- ...onent_ids_for_secured_project_for_user.xml | 8 +-- .../ResourceDaoTest/update-result.xml | 3 +- .../core/resource/ResourceDaoTest/update.xml | 3 +- .../ResourceKeyUpdaterDaoTest/shared.xml | 24 ++++--- .../shouldBulkUpdateKey-result.xml | 24 ++++--- ...BulkUpdateKeyOnOnlyOneSubmodule-result.xml | 24 ++++--- .../shouldNotUpdateAllSubmodules-result.xml | 21 ++++-- .../shouldNotUpdateAllSubmodules.xml | 21 ++++-- .../shouldUpdateKey-result.xml | 24 ++++--- 45 files changed, 431 insertions(+), 161 deletions(-) create mode 100644 server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigration.java create mode 100644 server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest.java create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/after.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/before.xml create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/schema.sql create mode 100644 server/sonar-web/src/main/webapp/WEB-INF/db/migrate/700_add_authorization_updated_at_to_projects.rb create mode 100644 server/sonar-web/src/main/webapp/WEB-INF/db/migrate/701_insert_projects_authorization_updated_at.rb diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrations.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrations.java index e42b945d93e..755c8ad5cef 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrations.java +++ b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrations.java @@ -23,19 +23,10 @@ import com.google.common.collect.ImmutableList; import org.sonar.server.db.migrations.v36.ViolationMigration; import org.sonar.server.db.migrations.v42.CompleteIssueMessageMigration; import org.sonar.server.db.migrations.v42.PackageKeysMigration; -import org.sonar.server.db.migrations.v43.ConvertIssueDebtToMinutesMigration; -import org.sonar.server.db.migrations.v43.DevelopmentCostMeasuresMigration; -import org.sonar.server.db.migrations.v43.IssueChangelogMigration; -import org.sonar.server.db.migrations.v43.NotResolvedIssuesOnRemovedComponentsMigration; -import org.sonar.server.db.migrations.v43.RequirementMeasuresMigration; -import org.sonar.server.db.migrations.v43.TechnicalDebtMeasuresMigration; -import org.sonar.server.db.migrations.v44.ChangeLogMigration; -import org.sonar.server.db.migrations.v44.ConvertProfileMeasuresMigration; -import org.sonar.server.db.migrations.v44.FeedQProfileDatesMigration; -import org.sonar.server.db.migrations.v44.FeedQProfileKeysMigration; -import org.sonar.server.db.migrations.v44.IssueActionPlanKeyMigration; -import org.sonar.server.db.migrations.v44.MeasureDataMigration; +import org.sonar.server.db.migrations.v43.*; +import org.sonar.server.db.migrations.v44.*; import org.sonar.server.db.migrations.v45.AddMissingRuleParameterDefaultValuesMigration; +import org.sonar.server.db.migrations.v50.InsertProjectsAuthorizationUpdatedAtMigration; import java.util.List; @@ -65,7 +56,10 @@ public interface DatabaseMigrations { ConvertProfileMeasuresMigration.class, // 4.5 - AddMissingRuleParameterDefaultValuesMigration.class + AddMissingRuleParameterDefaultValuesMigration.class, + + // 5.0 + InsertProjectsAuthorizationUpdatedAtMigration.class ); } diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigration.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigration.java new file mode 100644 index 00000000000..2d3d2a541a6 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigration.java @@ -0,0 +1,65 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube 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. + * + * SonarQube 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.db.migrations.v50; + +import org.sonar.api.utils.System2; +import org.sonar.core.persistence.Database; +import org.sonar.server.db.migrations.BaseDataChange; +import org.sonar.server.db.migrations.MassUpdate; +import org.sonar.server.db.migrations.Select; +import org.sonar.server.db.migrations.SqlStatement; + +import java.sql.SQLException; +import java.util.Date; + +/** + * Used in the Active Record Migration 701 + * + * @since 5.0 + */ +public class InsertProjectsAuthorizationUpdatedAtMigration extends BaseDataChange { + + private final System2 system; + + public InsertProjectsAuthorizationUpdatedAtMigration(Database db, System2 system) { + super(db); + this.system = system; + } + + @Override + public void execute(Context context) throws SQLException { + final Date now = new Date(system.now()); + + MassUpdate massUpdate = context.prepareMassUpdate(); + massUpdate.select("SELECT p.id FROM projects p WHERE p.scope=? AND p.enabled=?").setString(1, "PRJ").setBoolean(2, true); + massUpdate.update("UPDATE projects SET authorization_updated_at=? WHERE id=?"); + massUpdate.execute(new MassUpdate.Handler() { + @Override + public boolean handle(Select.Row row, SqlStatement update) throws SQLException { + Long id = row.getLong(1); + update.setDate(1, now); + update.setLong(2, id); + return true; + } + }); + } + +} diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest.java new file mode 100644 index 00000000000..15d30bf2a7c --- /dev/null +++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest.java @@ -0,0 +1,58 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube 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. + * + * SonarQube 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.db.migrations.v50; + +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; +import org.sonar.api.utils.DateUtils; +import org.sonar.api.utils.System2; +import org.sonar.core.persistence.TestDatabase; +import org.sonar.server.db.migrations.DatabaseMigration; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class InsertProjectsAuthorizationUpdatedAtMigrationTest { + + @ClassRule + public static TestDatabase db = new TestDatabase().schema(InsertProjectsAuthorizationUpdatedAtMigrationTest.class, "schema.sql"); + + DatabaseMigration migration; + System2 system = mock(System2.class); + + @Before + public void setUp() throws Exception { + db.executeUpdateSql("truncate table projects"); + migration = new InsertProjectsAuthorizationUpdatedAtMigration(db.database(), system); + when(system.now()).thenReturn(DateUtils.parseDate("2014-09-03").getTime()); + } + + @Test + public void execute() throws Exception { + db.prepareDbUnit(getClass(), "before.xml"); + + migration.execute(); + + db.assertDbUnit(getClass(), "after.xml", "projects"); + } + +} diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/persistence/ComponentDaoTest/insert-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/persistence/ComponentDaoTest/insert-result.xml index 73f37328882..397d2ae97fc 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/component/persistence/ComponentDaoTest/insert-result.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/persistence/ComponentDaoTest/insert-result.xml @@ -3,7 +3,7 @@ diff --git a/server/sonar-server/src/test/resources/org/sonar/server/component/persistence/ComponentDaoTest/multi-modules.xml b/server/sonar-server/src/test/resources/org/sonar/server/component/persistence/ComponentDaoTest/multi-modules.xml index decdab5279a..771faf6ec97 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/component/persistence/ComponentDaoTest/multi-modules.xml +++ b/server/sonar-server/src/test/resources/org/sonar/server/component/persistence/ComponentDaoTest/multi-modules.xml @@ -7,7 +7,7 @@ + enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="[null]" /> + description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]" /> + description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]" /> + enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]" /> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]" /> + enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="[null]" /> + description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]" /> + enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]" /> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]" /> + + + + + + + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/before.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/before.xml new file mode 100644 index 00000000000..717580c2589 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/before.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/schema.sql b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/schema.sql new file mode 100644 index 00000000000..af8d7161e46 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/schema.sql @@ -0,0 +1,18 @@ +CREATE TABLE "PROJECTS" ( + "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + "NAME" VARCHAR(256), + "DESCRIPTION" VARCHAR(2000), + "ENABLED" BOOLEAN NOT NULL DEFAULT TRUE, + "SCOPE" VARCHAR(3), + "QUALIFIER" VARCHAR(10), + "KEE" VARCHAR(400), + "DEPRECATED_KEE" VARCHAR(400), + "PATH" VARCHAR(2000), + "ROOT_ID" INTEGER, + "LANGUAGE" VARCHAR(20), + "COPY_RESOURCE_ID" INTEGER, + "LONG_NAME" VARCHAR(256), + "PERSON_ID" INTEGER, + "CREATED_AT" TIMESTAMP, + "AUTHORIZATION_UPDATED_AT" TIMESTAMP +); diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/700_add_authorization_updated_at_to_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/700_add_authorization_updated_at_to_projects.rb new file mode 100644 index 00000000000..3a243c84cff --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/700_add_authorization_updated_at_to_projects.rb @@ -0,0 +1,31 @@ +# +# SonarQube, open source software quality management tool. +# Copyright (C) 2008-2014 SonarSource +# mailto:contact AT sonarsource DOT com +# +# SonarQube 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. +# +# SonarQube 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. +# + +# +# SonarQube 5.0 +# SONAR-5589 +# +class AddAuthorizationUpdatedAtToProjects < ActiveRecord::Migration + + def self.up + add_column 'projects', :authorization_updated_at, :datetime, :null => true + end +end + diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/701_insert_projects_authorization_updated_at.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/701_insert_projects_authorization_updated_at.rb new file mode 100644 index 00000000000..365ae624d80 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/701_insert_projects_authorization_updated_at.rb @@ -0,0 +1,32 @@ +# +# SonarQube, open source software quality management tool. +# Copyright (C) 2008-2014 SonarSource +# mailto:contact AT sonarsource DOT com +# +# SonarQube 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. +# +# SonarQube 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. +# + +# +# SonarQube 5.0 +# SONAR-5589 +# +class InsertProjectsAuthorizationUpdatedAt < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.server.db.migrations.v50.InsertProjectsAuthorizationUpdatedAtMigration') + end + +end + diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java index e08774d96c1..c9ae930855b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java @@ -36,13 +36,10 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import static org.fest.assertions.Assertions.assertThat; -import static org.hamcrest.Matchers.is; import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; +import static org.mockito.Mockito.*; public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase { @@ -91,7 +88,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase { ResourcePersister persister = new DefaultResourcePersister(getSession(), mock(ResourcePermissions.class), snapshotCache, resourceCache); persister.saveProject(singleProject, null); - checkTables("shouldSaveNewProject", new String[] {"build_date", "created_at"}, "projects", "snapshots"); + checkTables("shouldSaveNewProject", new String[] {"build_date", "created_at", "authorization_updated_at"}, "projects", "snapshots"); // SONAR-3636 : created_at must be fed when inserting a new entry in the 'projects' table ResourceModel model = getSession().getSingleResult(ResourceModel.class, "key", singleProject.getKey()); @@ -105,7 +102,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase { ResourcePersister persister = new DefaultResourcePersister(getSession(), mock(ResourcePermissions.class), snapshotCache, resourceCache); persister.saveProject(singleCopyProject, null); - checkTables("shouldSaveCopyProject", new String[] {"build_date", "created_at"}, "projects", "snapshots"); + checkTables("shouldSaveCopyProject", new String[] {"build_date", "created_at", "authorization_updated_at"}, "projects", "snapshots"); } @Test @@ -118,7 +115,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase { persister.saveProject(moduleB, multiModuleProject); persister.saveProject(moduleB1, moduleB); - checkTables("shouldSaveNewMultiModulesProject", new String[] {"build_date", "created_at"}, "projects", "snapshots"); + checkTables("shouldSaveNewMultiModulesProject", new String[] {"build_date", "created_at", "authorization_updated_at"}, "projects", "snapshots"); } @Test @@ -131,7 +128,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase { Directory.create("src/main/java/org/foo", "org.foo").setEffectiveKey("foo:src/main/java/org/foo")); // check that the directory is attached to the project - checkTables("shouldSaveNewDirectory", new String[] {"build_date", "created_at"}, "projects", "snapshots"); + checkTables("shouldSaveNewDirectory", new String[] {"build_date", "created_at", "authorization_updated_at"}, "projects", "snapshots"); } @Test @@ -144,7 +141,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase { persister.saveResource(singleProject, new Library("junit:junit", "4.8.2").setEffectiveKey("junit:junit"));// do nothing, already saved persister.saveResource(singleProject, new Library("junit:junit", "3.2").setEffectiveKey("junit:junit")); - checkTables("shouldSaveNewLibrary", new String[] {"build_date", "created_at"}, "projects", "snapshots"); + checkTables("shouldSaveNewLibrary", new String[] {"build_date", "created_at", "authorization_updated_at"}, "projects", "snapshots"); } @Test @@ -172,7 +169,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase { singleProject.setDescription("new description"); persister.saveProject(singleProject, null); - checkTables("shouldUpdateExistingResource", new String[] {"build_date", "created_at"}, "projects", "snapshots"); + checkTables("shouldUpdateExistingResource", new String[] {"build_date", "created_at", "authorization_updated_at"}, "projects", "snapshots"); } // SONAR-1700 @@ -183,7 +180,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase { ResourcePersister persister = new DefaultResourcePersister(getSession(), mock(ResourcePermissions.class), snapshotCache, resourceCache); persister.saveProject(singleProject, null); - checkTables("shouldRemoveRootIndexIfResourceIsProject", new String[] {"build_date", "created_at"}, "projects", "snapshots"); + checkTables("shouldRemoveRootIndexIfResourceIsProject", new String[] {"build_date", "created_at", "authorization_updated_at"}, "projects", "snapshots"); } @Test diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/ResourceKeyMigrationTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/ResourceKeyMigrationTest.java index 1fe27bc91b1..3d8d7540787 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/index/ResourceKeyMigrationTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/index/ResourceKeyMigrationTest.java @@ -112,7 +112,7 @@ public class ResourceKeyMigrationTest extends AbstractDbUnitTestCase { verify(logger).info("Component {} changed to {}", "b:org/foo", "b:src/main/java/org/foo"); verify(logger).info("Component {} changed to {}", "b:[root]", "b:src/main/java"); - checkTables("shouldMigrateResourceKeys", new String[] {"build_date", "created_at"}, "projects"); + checkTables("shouldMigrateResourceKeys", new String[] {"build_date", "created_at", "authorization_updated_at"}, "projects"); } private static Project newProject(String key, String language) { diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java index ee7e376fa52..639bbc835eb 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java @@ -33,7 +33,7 @@ import java.util.List; */ public class DatabaseVersion implements BatchComponent, ServerComponent { - public static final int LAST_VERSION = 583; + public static final int LAST_VERSION = 701; public static enum Status { UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql index 9634897e73f..ddf06f6e80b 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql @@ -253,6 +253,8 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('580'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('581'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('582'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('583'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('700'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('701'); INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '2011-09-26 22:27:48.0', '2011-09-26 22:27:48.0', null, null); ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2; diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl index d3c9a53a3e4..013bbc2ad72 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl @@ -266,7 +266,8 @@ CREATE TABLE "PROJECTS" ( "COPY_RESOURCE_ID" INTEGER, "LONG_NAME" VARCHAR(256), "PERSON_ID" INTEGER, - "CREATED_AT" TIMESTAMP + "CREATED_AT" TIMESTAMP, + "AUTHORIZATION_UPDATED_AT" TIMESTAMP ); CREATE TABLE "MANUAL_MEASURES" ( diff --git a/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java b/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java index 9b920b06fa7..03192a96181 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java @@ -76,7 +76,7 @@ public class AuthorDaoTest extends AbstractDaoTestCase { checkTables("shouldInsertAuthorAndDeveloper", new String[] {"created_at", "updated_at", "copy_resource_id", "description", "enabled", "kee", "deprecated_kee", "path", "language", "long_name", "person_id", "root_id", - "scope"}, + "scope", "authorization_updated_at"}, "authors", "projects"); } @@ -108,7 +108,7 @@ public class AuthorDaoTest extends AbstractDaoTestCase { checkTables("shouldPreventAuthorsAndDevelopersDuplication", new String[] {"created_at", "updated_at", "copy_resource_id", "description", "enabled", "kee", "deprecated_kee", "path", "language", "long_name", "person_id", "root_id", - "scope"}, + "scope", "authorization_updated_at"}, "authors", "projects"); } } diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/disable_resources_without_last_snapshot-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/disable_resources_without_last_snapshot-result.xml index 9663761342b..a040e19d4cb 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/disable_resources_without_last_snapshot-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/disable_resources_without_last_snapshot-result.xml @@ -11,17 +11,17 @@ What has been changed : + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> - \ No newline at end of file + diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml index 34716adee47..5c9aeaa6580 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml @@ -3,7 +3,7 @@ + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> - \ No newline at end of file + diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml index fa6f544a993..99e649835bb 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml @@ -9,17 +9,17 @@ What has been changed : purge_status=1 on snapshot 4 (PRJ) and snapshots 5 and 6 + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]" /> - \ No newline at end of file + diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml index 917079471ee..a0d2def655e 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml @@ -3,7 +3,8 @@ + root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" + authorization_updated_at="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml index 7fcfe0326af..57028909f15 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml @@ -3,7 +3,8 @@ + root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" + authorization_updated_at="[null]" /> diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/should_delete_all_closed_issues-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/should_delete_all_closed_issues-result.xml index 4d55fe35f48..05e8216a312 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/should_delete_all_closed_issues-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/should_delete_all_closed_issues-result.xml @@ -7,7 +7,7 @@ + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="1" person_id="[null]" authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/> + enabled="[false]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_resource_id.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_resource_id.xml index 2b948c6aedc..0e975c6137e 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_resource_id.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/get_last_snapshot_by_resource_id.xml @@ -1,23 +1,3 @@ - - @@ -27,7 +7,7 @@ + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="/foo/bar" deprecated_kee="org.struts:struts:org.struts.Action" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts:org.struts.Filter" + authorization_updated_at="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_group.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_group.xml index 7463dda0ea7..62891ca34dd 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_group.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/should_find_children_component_ids_for_secured_project_for_group.xml @@ -10,7 +10,7 @@ + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="/foo/bar" deprecated_kee="deprecated key" + authorization_updated_at="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update.xml index 9ba62dc1976..a735a55c1b5 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update.xml @@ -2,6 +2,7 @@ + enabled="[false]" language="old" copy_resource_id="2" person_id="3" created_at="[null]" path="/old/foo/bar" deprecated_kee="old deprecated key" + authorization_updated_at="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml index e3c65aea1e3..584e9a41f71 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml @@ -3,48 +3,56 @@ + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts.RequestContext" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui:org.struts.RequestContext" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-core" + authorization_updated_at="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml index b55b2699b11..4a66a14feac 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml @@ -3,48 +3,56 @@ + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts.RequestContext" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-ui" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-ui:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-ui:org.struts.RequestContext" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-core" + authorization_updated_at="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml index ba73191c96f..39444c817ab 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml @@ -3,48 +3,56 @@ + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts.RequestContext" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-web" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-web:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-web:org.struts.RequestContext" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-core" + authorization_updated_at="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml index 55aa9728ecf..32f0b44755b 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml @@ -3,42 +3,49 @@ + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts.RequestContext" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui:org.struts.RequestContext" + authorization_updated_at="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml index 58d4452c3b1..7dca7c04c32 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml @@ -3,42 +3,49 @@ + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts.RequestContext" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui:org.struts.RequestContext" + authorization_updated_at="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml index 360bd068c94..1b07204d6f7 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml @@ -3,7 +3,8 @@ + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts" + authorization_updated_at="[null]"/> @@ -11,42 +12,49 @@ + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="struts:core" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="struts:core:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="struts:core:org.struts.RequestContext" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui:org.struts" + authorization_updated_at="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui:org.struts.RequestContext" + authorization_updated_at="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-core" + authorization_updated_at="[null]"/> -- 2.39.5