From: David Gageot Date: Mon, 6 Jul 2015 16:33:47 +0000 (+0200) Subject: Fix UpdateCenter ITs X-Git-Tag: 5.2-RC1~1201 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c50d05a36f97689bcfd653d5e5e7201562011034;p=sonarqube.git Fix UpdateCenter ITs --- diff --git a/it/it-tests/src/test/java/updatecenter/UpdateCenterSystemUpdateTest.java b/it/it-tests/src/test/java/updatecenter/UpdateCenterSystemUpdateTest.java deleted file mode 100644 index 20ed430e207..00000000000 --- a/it/it-tests/src/test/java/updatecenter/UpdateCenterSystemUpdateTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2009-2014 SonarSource SA - * All rights reserved - * mailto:contact AT sonarsource DOT com - */ -package updatecenter; - -import com.sonar.orchestrator.Orchestrator; -import com.sonar.orchestrator.selenium.Selenese; -import java.io.File; -import java.io.IOException; -import org.apache.commons.io.FileUtils; -import org.junit.After; -import org.junit.Test; - -import static org.assertj.core.api.Assertions.assertThat; -import static util.ItUtils.pluginArtifact; - -public class UpdateCenterSystemUpdateTest { - - Orchestrator orchestrator; - - @After - public void stop() { - if (orchestrator != null) { - orchestrator.stop(); - } - } - - /** - * SONAR-4279 - */ - @Test - public void should_not_display_already_compatible_plugins_on_system_update() { - orchestrator = Orchestrator.builderEnv() - .setServerProperty("sonar.updatecenter.url", - UpdateCenterSystemUpdateTest.class.getResource("UpdateCenterTest/update-center-system-update-with-already-compatible-plugins.properties").toString()) - .addPlugin(pluginArtifact("sonar-fake-plugin")) - .build(); - - orchestrator.start(); - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("system-updates-without-plugin-updates", - "/updatecenter/system-updates-without-plugin-updates.html" - ).build(); - orchestrator.executeSelenese(selenese); - } - - /** - * SONAR-4585 - */ - @Test - public void should_system_update_page_not_fail_when_installed_plugin_version_not_found_in_update_center_definitions() throws IOException { - orchestrator = Orchestrator.builderEnv() - .setServerProperty("sonar.updatecenter.url", - UpdateCenterSystemUpdateTest.class.getResource("UpdateCenterTest/update-center-with-missing-plugin-version.properties").toString()) - .addPlugin(pluginArtifact("sonar-fake-plugin")) - .build(); - - orchestrator.start(); - - Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("system-updates-with-missing-installed-plugin-version", - "/updatecenter/system-updates-with-missing-installed-plugin-version.html" - ).build(); - orchestrator.executeSelenese(selenese); - - // Exception stacktrace should not be in logs - File logs = orchestrator.getServer().getLogs(); - assertThat(FileUtils.readFileToString(logs)).doesNotContain("NoSuchElementException"); - } - -} diff --git a/it/it-tests/src/test/resources/updatecenter/UpdateCenterTest/update-center-system-update-with-already-compatible-plugins.properties b/it/it-tests/src/test/resources/updatecenter/UpdateCenterTest/update-center-system-update-with-already-compatible-plugins.properties deleted file mode 100644 index 50c8c2b5204..00000000000 --- a/it/it-tests/src/test/resources/updatecenter/UpdateCenterTest/update-center-system-update-with-already-compatible-plugins.properties +++ /dev/null @@ -1,32 +0,0 @@ -# THIS FILE IS USED BY THE UPDATE CENTER -# DO NOT REMOVE OR RENAME -# -# Note : prefix all : by \ -# - -publicVersions=3.0,100.0 - -3.0.description=Encryption of database password, TimeMachine available as widgets, New algorithm for tracking violations, 40 bugs and 40 improvements -3.0.downloadUrl=http\://dist.sonar.codehaus.org/sonar-3.0.zip -3.0.changelogUrl=http\://www.sonarsource.org/downloads/#3.0 -3.0.date=2012-04-17 - -100.0.description=Hundred dot zero! -100.0.downloadUrl=http\://dist.sonar.codehaus.org/sonar-100.0.zip -100.0.changelogUrl=http\://www.sonarsource.org/downloads/#100.0 -100.0.date=2112-06-13 - - -plugins=fake - -#-------------------------------------------------------------------------------------------------------------------------- -fake.category=Additional Metrics -fake.publicVersions=1.0 -fake.name=Fake -fake.description=Fake plugin for integration tests - -fake.1.0.description=Initial release -fake.1.0.sqVersions=3.2,3.3,3.4,3.5,3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13,3.14,3.15,3.16,100.0 -fake.1.0.downloadUrl= -fake.1.0.date=2011-05-06 - diff --git a/it/it-tests/src/test/resources/updatecenter/UpdateCenterTest/update-center-with-missing-plugin-version.properties b/it/it-tests/src/test/resources/updatecenter/UpdateCenterTest/update-center-with-missing-plugin-version.properties deleted file mode 100644 index 11d35d2f1b8..00000000000 --- a/it/it-tests/src/test/resources/updatecenter/UpdateCenterTest/update-center-with-missing-plugin-version.properties +++ /dev/null @@ -1,30 +0,0 @@ -# THIS FILE IS USED BY THE UPDATE CENTER -# DO NOT REMOVE OR RENAME -# -# Note : prefix all : by \ -# - -publicVersions=3.0,100.0 - -3.0.description=Encryption of database password, TimeMachine available as widgets, New algorithm for tracking violations, 40 bugs and 40 improvements -3.0.downloadUrl=http\://dist.sonar.codehaus.org/sonar-3.0.zip -3.0.changelogUrl=http\://www.sonarsource.org/downloads/#3.0 -3.0.date=2012-04-17 - -100.0.description=Hundred dot zero! -100.0.downloadUrl=http\://dist.sonar.codehaus.org/sonar-100.0.zip -100.0.changelogUrl=http\://www.sonarsource.org/downloads/#100.0 -100.0.date=2112-06-13 - -plugins=fake - -#-------------------------------------------------------------------------------------------------------------------------- -fake.category=Additional Metrics -fake.publicVersions=1.1 -fake.name=Fake -fake.description=Fake plugin for integration tests - -fake.1.1.description=Support sonar 100.0 -fake.1.1.sqVersions=3.2,3.3,3.4,3.5,3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13,3.14,3.15,3.16,100.0 -fake.1.1.downloadUrl= -fake.1.1.date=2012-04-27