Commit 8af689e3 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

unit tests requiring conection to dapi are ignored when there is none provided

parent ea4dc6c2
......@@ -2,6 +2,7 @@ package lcsb.mapviewer.web;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.*;
import static org.springframework.restdocs.payload.PayloadDocumentation.*;
......@@ -200,6 +201,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
@Test
public void getDapiDrugBankReleaseConfiguration() throws Exception {
assumeTrue("DAPI credentials are not provided", isDapiConfigurationAvailable());
RequestBuilder request = get("/configuration/dapi/database/{database}/release/", "DrugBank");
mockMvc.perform(request)
......@@ -235,6 +237,7 @@ public class ConfigurationControllerIntegrationTest extends ControllerIntegratio
@Test
public void acceptLicenseReleaseWithAccess() throws Exception {
assumeTrue("DAPI credentials are not provided", isDapiConfigurationAvailable());
MockHttpSession session = createSession(BUILT_IN_TEST_ADMIN_LOGIN, BUILT_IN_TEST_ADMIN_PASSWORD);
RequestBuilder request = post("/configuration/dapi/database/{database}/release/{release}:acceptLicense", "DrugBank",
......
Markdown is supported
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