This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 68057753ac584b3d6f10f89a477a8ba6c4b934ae Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Nov 25 18:20:56 2016 +0100 Fix tests --- .../configuration/ObserveWebApplicationConfig.java | 2 +- .../v1/data/NavigationServiceController.java | 22 ++++++++++ .../db/ObserveWebDatabasesHelperTest.java | 50 +++++++++++----------- .../user/ObserveWebUsersHelperTest.java | 2 + 4 files changed, 51 insertions(+), 25 deletions(-) diff --git a/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfig.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfig.java index 768ccf4..cb00323 100644 --- a/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfig.java +++ b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfig.java @@ -100,7 +100,7 @@ public class ObserveWebApplicationConfig extends GeneratedObserveWebApplicationC if (log.isInfoEnabled()) { log.info("Dev mode detected, use temporary basedir: " + baseDirectory); } - get().setOption(ObserveWebApplicationConfigOption.BASE_DIRECTORY.getKey(), baseDirectory.getAbsolutePath()); + setBaseDirectory(baseDirectory); } if (log.isInfoEnabled()) { diff --git a/application-web/src/main/java/fr/ird/observe/application/web/controller/v1/data/NavigationServiceController.java b/application-web/src/main/java/fr/ird/observe/application/web/controller/v1/data/NavigationServiceController.java index 667284e..41ada0f 100644 --- a/application-web/src/main/java/fr/ird/observe/application/web/controller/v1/data/NavigationServiceController.java +++ b/application-web/src/main/java/fr/ird/observe/application/web/controller/v1/data/NavigationServiceController.java @@ -1,5 +1,27 @@ package fr.ird.observe.application.web.controller.v1.data; +/*- + * #%L + * ObServe :: Application Web + * %% + * Copyright (C) 2008 - 2016 IRD, Code Lutin, Tony Chemit + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import fr.ird.observe.application.web.controller.v1.ObserveAuthenticatedServiceControllerSupport; import fr.ird.observe.services.service.data.NavigationRequest; import fr.ird.observe.services.service.data.NavigationResult; diff --git a/application-web/src/test/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabasesHelperTest.java b/application-web/src/test/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabasesHelperTest.java index 047502d..c10a7ef 100644 --- a/application-web/src/test/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabasesHelperTest.java +++ b/application-web/src/test/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabasesHelperTest.java @@ -51,29 +51,29 @@ import java.util.Set; public class ObserveWebDatabasesHelperTest { public static final String FILE_CONTENT = "databases: \n" + - "- name: production\n" + - " defaultDatabase: true\n" + - " roles: \n" + - " - login: admin\n" + - " password: passwordAdmin\n" + - " - login: technicien\n" + - " password: passwordTechnicien\n" + - " - login: utilisateur\n" + - " password: passwordUtilisateur\n" + - " - login: referentiel\n" + - " password: passwordReferentiel\n" + - " url: jdbc:postgresql://localhost:5432/production\n" + - "- name: test\n" + - " roles: \n" + - " - login: admin\n" + - " password: passwordAdmin\n" + - " - login: technicien\n" + - " password: passwordTechnicien\n" + - " - login: utilisateur\n" + - " password: passwordUtilisateur\n" + - " - login: referentiel\n" + - " password: passwordReferentiel\n" + - " url: jdbc:postgresql://localhost:5432/test\n"; + "- name: production\n" + + " defaultDatabase: true\n" + + " roles: \n" + + " - login: admin\n" + + " password: passwordAdmin\n" + + " - login: technicien\n" + + " password: passwordTechnicien\n" + + " - login: utilisateur\n" + + " password: passwordUtilisateur\n" + + " - login: referentiel\n" + + " password: passwordReferentiel\n" + + " url: jdbc:postgresql://localhost:5432/production\n" + + "- name: test\n" + + " roles: \n" + + " - login: admin\n" + + " password: passwordAdmin\n" + + " - login: technicien\n" + + " password: passwordTechnicien\n" + + " - login: utilisateur\n" + + " password: passwordUtilisateur\n" + + " - login: referentiel\n" + + " password: passwordReferentiel\n" + + " url: jdbc:postgresql://localhost:5432/test\n"; protected ObserveWebApplicationConfig configuration; @@ -88,7 +88,9 @@ public class ObserveWebDatabasesHelperTest { } @Before - public void setUp() { + public void setUp() throws IOException { + + java.nio.file.Files.createDirectories(new File(System.getProperty("java.io.tmpdir")).toPath()); configuration = new ObserveWebApplicationConfig("observeweb-test.conf"); configuration.setBaseDirectory(Files.createTempDir()); configuration.init(); diff --git a/application-web/src/test/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsersHelperTest.java b/application-web/src/test/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsersHelperTest.java index ba1df5e..5827b82 100644 --- a/application-web/src/test/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsersHelperTest.java +++ b/application-web/src/test/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsersHelperTest.java @@ -74,6 +74,8 @@ public class ObserveWebUsersHelperTest { @Before public void setUp() throws Exception { + java.nio.file.Files.createDirectories(new File(System.getProperty("java.io.tmpdir")).toPath()); + configuration = new ObserveWebApplicationConfig("observeweb-test.conf"); configuration.setBaseDirectory(Files.createTempDir()); configuration.init(); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.