diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-03-02 17:49:10 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-03-08 21:15:37 +0100 |
commit | 16264d1be3af1f8b5709a1811c4b4e58bc22762e (patch) | |
tree | 3c28735bd0e80dbcae7e1e899b0a6eb7e76cfc92 /tests/upgrade | |
parent | e2bf4b506020297b7bda20d320bf4b61a4315825 (diff) | |
download | sonarqube-16264d1be3af1f8b5709a1811c4b4e58bc22762e.tar.gz sonarqube-16264d1be3af1f8b5709a1811c4b4e58bc22762e.zip |
Enable upgrade tests on QA env
Diffstat (limited to 'tests/upgrade')
8 files changed, 167 insertions, 18 deletions
diff --git a/tests/upgrade/pom.xml b/tests/upgrade/pom.xml index 9386310196e..e83be7677a4 100644 --- a/tests/upgrade/pom.xml +++ b/tests/upgrade/pom.xml @@ -26,6 +26,12 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-update-center-common</artifactId> + <version>1.12.1</version> + <scope>test</scope> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> @@ -35,11 +41,57 @@ <artifactId>assertj-core</artifactId> <scope>test</scope> </dependency> - <dependency> - <groupId>com.oracle</groupId> - <artifactId>ojdbc6</artifactId> - <scope>test</scope> - </dependency> </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <argLine>-Dsonar.runtimeVersion=${project.version} -Dmaven.localRepository=${settings.localRepository}</argLine> + </configuration> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>with-db-drivers</id> + <activation> + <property> + <name>with-db-drivers</name> + </property> + </activation> + <dependencies> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + </dependency> + <dependency> + <groupId>org.postgresql</groupId> + <artifactId>postgresql</artifactId> + </dependency> + <dependency> + <groupId>com.oracle</groupId> + <artifactId>ojdbc6</artifactId> + </dependency> + <dependency> + <!-- used to start previous versions of SQ on MSSQL --> + <groupId>net.sourceforge.jtds</groupId> + <artifactId>jtds</artifactId> + <version>1.3.1</version> + </dependency> + <dependency> + <groupId>com.microsoft.sqljdbc</groupId> + <artifactId>sqljdbc41</artifactId> + <version>4.1</version> + <scope>system</scope> + <systemPath>${project.basedir}/../../sonar-application/src/main/assembly/lib/jdbc/mssql/sqljdbc41.jar + </systemPath> + </dependency> + </dependencies> + </profile> + </profiles> + </project> diff --git a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/MssqlConfig.java b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/MssqlConfig.java index ee4f01e540b..1db2e1ee8b2 100644 --- a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/MssqlConfig.java +++ b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/MssqlConfig.java @@ -1,7 +1,21 @@ /* + * SonarQube * Copyright (C) 2009-2016 SonarSource SA - * All rights reserved * mailto:contact 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.sonarsource.sonarqube.upgrade; diff --git a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerMigrationCall.java b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerMigrationCall.java index d7253c39826..5be9c81b9ad 100644 --- a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerMigrationCall.java +++ b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerMigrationCall.java @@ -1,7 +1,21 @@ /* + * SonarQube * Copyright (C) 2009-2016 SonarSource SA - * All rights reserved * mailto:contact 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.sonarsource.sonarqube.upgrade; diff --git a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerMigrationResponse.java b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerMigrationResponse.java index 09a5e0b0167..8d3f5e63663 100644 --- a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerMigrationResponse.java +++ b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerMigrationResponse.java @@ -1,7 +1,21 @@ /* + * SonarQube * Copyright (C) 2009-2016 SonarSource SA - * All rights reserved * mailto:contact 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.sonarsource.sonarqube.upgrade; diff --git a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerStatusCall.java b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerStatusCall.java index bb33e92aa1d..174f97df7ea 100644 --- a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerStatusCall.java +++ b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerStatusCall.java @@ -1,7 +1,21 @@ /* + * SonarQube * Copyright (C) 2009-2016 SonarSource SA - * All rights reserved * mailto:contact 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.sonarsource.sonarqube.upgrade; diff --git a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerStatusResponse.java b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerStatusResponse.java index a8ea563ea6e..c53397edb14 100644 --- a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerStatusResponse.java +++ b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/ServerStatusResponse.java @@ -1,7 +1,21 @@ /* + * SonarQube * Copyright (C) 2009-2016 SonarSource SA - * All rights reserved * mailto:contact 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.sonarsource.sonarqube.upgrade; diff --git a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java index 6401fa15cbb..78108ddc1a4 100644 --- a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java +++ b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java @@ -1,7 +1,21 @@ /* + * SonarQube * Copyright (C) 2009-2016 SonarSource SA - * All rights reserved * mailto:contact 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.sonarsource.sonarqube.upgrade; @@ -37,16 +51,11 @@ public class UpgradeTest { } @Test - public void test_upgrade_from_lts() { + public void test_upgrade_from_4_5_lts() { testDatabaseUpgrade(Version.create("4.5.1")); } @Test - public void test_upgrade_from_5_0() { - testDatabaseUpgrade(Version.create("5.0.1")); - } - - @Test public void test_upgrade_from_5_2() { testDatabaseUpgrade(Version.create("5.2")); } @@ -83,6 +92,10 @@ public class UpgradeTest { private void browseWebapp() { testUrl("/"); + testUrl("/api/issues/search"); + testUrl("/api/components/tree"); + testUrl("/api/measures/component_tree?baseComponentKey=org.apache.struts%3Astruts-core"); + testUrl("/api/qualityprofiles/search"); testUrl("/issues/index"); testUrl("/dashboard/index/org.apache.struts:struts-parent"); testUrl("/issues/search"); diff --git a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/WsCallAndWait.java b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/WsCallAndWait.java index 5ae61f1815d..d4ea4bf91dd 100644 --- a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/WsCallAndWait.java +++ b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/WsCallAndWait.java @@ -1,7 +1,21 @@ /* + * SonarQube * Copyright (C) 2009-2016 SonarSource SA - * All rights reserved * mailto:contact 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.sonarsource.sonarqube.upgrade; |