Commit 68198958 authored by Eduardo Santos's avatar Eduardo Santos
Browse files

Merge branch 'develop' of...

Merge branch 'develop' of https://labs.etsi.org/rep/osl/code/org.etsi.osl.tmf.api into feature/tmf702-api
parents d02c9d8e 67ae7956
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -106,11 +106,11 @@ public class ResourceCatalogIntegrationTest {

	private static final transient Log logger = LogFactory.getLog( ResourceCatalogIntegrationTest.class.getName());

	private static final int FIXED_BOOTSTRAPS_SPECS = 7;
	private static final int FIXED_BOOTSTRAPS_SPECS = 9;
	private static final int FIXED_BOOTSTRAPS_CATEGORIES = 3;
	private static final int FIXED_BOOTSTRAPS_PHYSICAL_SPECS = 1;
	private static final int FIXED_BOOTSTRAPS_NETWORK_SPECS = 3;
	private static final int FIXED_BOOTSTRAPS_LOGICAL_SPECS = 6;
	private static final int FIXED_BOOTSTRAPS_LOGICAL_SPECS = 8;
	
    @Autowired
    private MockMvc mvc;
+2 −1
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
@@ -87,7 +88,7 @@ import org.springframework.web.context.WebApplicationContext;
@RunWith(SpringRunner.class)
@Transactional
@SpringBootTest( webEnvironment = SpringBootTest.WebEnvironment.MOCK , classes = OpenAPISpringBoot.class)
//@AutoConfigureTestDatabase //this automatically uses h2
@AutoConfigureTestDatabase //this automatically uses h2
@AutoConfigureMockMvc 
@ActiveProfiles("testing")
//@TestPropertySource(
+0 −1
Original line number Diff line number Diff line
@@ -148,7 +148,6 @@ public class ResourceOrderIntegrationTest {
				.post("/resourceOrderingManagement/v4/resourceOrder")
				.with(SecurityMockMvcRequestPostProcessors.csrf()).contentType(MediaType.APPLICATION_JSON)
				.content(JsonUtils.toJson( resorder )))
				.andExpect(status().isOk())
				.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))
				.andExpect(status().isOk())
				.andReturn()
+3 −1
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
@@ -103,7 +104,7 @@ import net.minidev.json.JSONObject;
@RunWith(SpringRunner.class)
@Transactional
@SpringBootTest( webEnvironment = SpringBootTest.WebEnvironment.MOCK , classes = OpenAPISpringBoot.class)
//@AutoConfigureTestDatabase //this automatically uses h2
@AutoConfigureTestDatabase //this automatically uses h2
@AutoConfigureMockMvc 
@ActiveProfiles("testing")
//@TestPropertySource(
@@ -965,6 +966,7 @@ public class ServiceCatalogIntegrationTest {
		}
		
		assertThat(userPartyRoleOwnerexists  ).isTrue() ;
		List<ServiceSpecification> allSpecs = specRepoService.findAll();
		assertThat( specRepoService.findAll().size() ).isEqualTo( FIXED_BOOTSTRAPS_SPECS +1 );
		assertThat( specRepoService.findAll( null, new HashMap<>()).size() ).isEqualTo( FIXED_BOOTSTRAPS_SPECS ); //this is somehow wrong in Testing ONLY 
		
+1 −1
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ public class ResourceSpecificationApiControllerTest {
                .andReturn().getResponse().getContentAsString();

        List<LogicalResourceSpecification> listResSpecsResponse = JsonUtils.toListOfJsonObj(listResSpecsResponseString, LogicalResourceSpecification.class);
        assertEquals(7, listResSpecsResponse.size());
        assertEquals(9, listResSpecsResponse.size());

        mvc.perform(MockMvcRequestBuilders.get("/resourceCatalogManagement/v4/resourceSpecification")
                        .contentType(MediaType.APPLICATION_JSON)
Loading