Commit b0ae20b2 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

dapi connection must go over https

parent b14c93d6
Pipeline #28994 passed with stage
in 20 minutes and 32 seconds
minerva (15.0.1) stable; urgency=medium
* Bug fix: when there was problem with DAPI minerva threw unexpected error
(#1316)
* Bug fix: DAPI connection must go over HTTPS (#1316)
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 26 Jun 2020 11:00:00 +0200
......
......@@ -26,7 +26,7 @@ public class DapiConnectorImpl extends CachableInterface implements DapiConnecto
private static Logger logger = LogManager.getLogger();
private static final String DAPI_DOMAIN = "dapi.lcsb.uni.lu";
private static final String DAPI_BASE_URL = "http://" + DAPI_DOMAIN + "/api/";
private static final String DAPI_BASE_URL = "https://" + DAPI_DOMAIN + "/api/";
private ConfigurationDao configurationDao;
......
......@@ -26,7 +26,7 @@ public class CtdDapiConfiguration {
public DapiConnector dapiConnector() throws DapiConnectionException {
DapiConnectorImpl mock = (DapiConnectorImpl) Mockito.spy(dapiConnector);
Mockito.doReturn("http://dapi.lcsb.uni.lu/api/database/CTD/releases/2019.02/").when(mock)
Mockito.doReturn("https://dapi.lcsb.uni.lu/api/database/CTD/releases/2019.02/").when(mock)
.getLatestReleaseUrl("CTD");
Mockito.doReturn(true).when(mock).isValidConnection();
......
......@@ -26,7 +26,7 @@ public class DrugBankDapiConfiguration {
public DapiConnector dapiConnector() throws DapiConnectionException {
DapiConnectorImpl mock = (DapiConnectorImpl) Mockito.spy(dapiConnector);
Mockito.doReturn("http://dapi.lcsb.uni.lu/api/database/DrugBank/releases/5.1/").when(mock)
Mockito.doReturn("https://dapi.lcsb.uni.lu/api/database/DrugBank/releases/5.1/").when(mock)
.getLatestReleaseUrl("DrugBank");
Mockito.doReturn(true).when(mock).isValidConnection();
......
......@@ -28,7 +28,7 @@ public class CtdDapiConfiguration {
public DapiConnector dapiConnector() throws DapiConnectionException {
DapiConnectorImpl mock = (DapiConnectorImpl) Mockito.spy(dapiConnector);
Mockito.doReturn("http://dapi.lcsb.uni.lu/api/database/CTD/releases/2019.02/").when(mock)
Mockito.doReturn("https://dapi.lcsb.uni.lu/api/database/CTD/releases/2019.02/").when(mock)
.getLatestReleaseUrl(anyString());
Mockito.doReturn(true).when(mock).isValidConnection();
......
......@@ -26,7 +26,7 @@ public class DrugBankDapiConfiguration {
public DapiConnector dapiConnector() throws DapiConnectionException {
DapiConnectorImpl mock = (DapiConnectorImpl) Mockito.spy(dapiConnector);
Mockito.doReturn("http://dapi.lcsb.uni.lu/api/database/DrugBank/releases/5.1/").when(mock)
Mockito.doReturn("https://dapi.lcsb.uni.lu/api/database/DrugBank/releases/5.1/").when(mock)
.getLatestReleaseUrl("DrugBank");
Mockito.doReturn(true).when(mock).isValidConnection();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment