Search in sources :

Example 1 with UpdateItemAttributeRQ

use of com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ in project service-api by reportportal.

the class TestItemControllerTest method bulkUpdateItemAttributes.

@Test
void bulkUpdateItemAttributes() throws Exception {
    BulkInfoUpdateRQ request = new BulkInfoUpdateRQ();
    List<Long> launchIds = Arrays.asList(1L, 2L, 3L, 4L, 5L, 6L);
    request.setIds(launchIds);
    BulkInfoUpdateRQ.Description description = new BulkInfoUpdateRQ.Description();
    description.setAction(BulkInfoUpdateRQ.Action.CREATE);
    String comment = "created";
    description.setComment(comment);
    request.setDescription(description);
    UpdateItemAttributeRQ updateItemAttributeRQ = new UpdateItemAttributeRQ();
    updateItemAttributeRQ.setAction(BulkInfoUpdateRQ.Action.UPDATE);
    updateItemAttributeRQ.setFrom(new ItemAttributeResource("testKey", "testValue"));
    updateItemAttributeRQ.setTo(new ItemAttributeResource("updatedKey", "updatedValue"));
    request.setAttributes(Lists.newArrayList(updateItemAttributeRQ));
    mockMvc.perform(put(DEFAULT_PROJECT_BASE_URL + "/item/info").with(token(oAuthHelper.getDefaultToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(request))).andExpect(status().isOk());
    List<TestItem> items = testItemRepository.findAllById(launchIds);
    items.forEach(it -> testItemRepository.refresh(it));
    items.forEach(it -> {
        assertTrue(it.getAttributes().stream().noneMatch(attr -> "testKey".equals(attr.getKey()) && attr.getValue().equals("testValue") && !attr.isSystem()));
        assertTrue(it.getAttributes().stream().anyMatch(attr -> "updatedKey".equals(attr.getKey()) && attr.getValue().equals("updatedValue") && !attr.isSystem()));
        assertEquals(comment, it.getDescription());
    });
}
Also used : StatusEnum(com.epam.ta.reportportal.entity.enums.StatusEnum) java.util(java.util) ArgumentMatchers(org.mockito.ArgumentMatchers) MockMvcResultMatchers.jsonPath(org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath) Issue(com.epam.ta.reportportal.ws.model.issue.Issue) TestItem(com.epam.ta.reportportal.entity.item.TestItem) BulkInfoUpdateRQ(com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ) LocalDateTime(java.time.LocalDateTime) Autowired(org.springframework.beans.factory.annotation.Autowired) DefineIssueRQ(com.epam.ta.reportportal.ws.model.issue.DefineIssueRQ) UnlinkExternalIssueRQ(com.epam.ta.reportportal.ws.model.item.UnlinkExternalIssueRQ) ParameterResource(com.epam.ta.reportportal.ws.model.ParameterResource) ItemAttributeResource(com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource) FinishTestItemRQ(com.epam.ta.reportportal.ws.model.FinishTestItemRQ) StartTestItemRQ(com.epam.ta.reportportal.ws.model.StartTestItemRQ) Lists(com.google.common.collect.Lists) ImmutableList(com.google.common.collect.ImmutableList) MockMvcResultMatchers.status(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status) UpdateItemAttributeRQ(com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ) UpdateTestItemRQ(com.epam.ta.reportportal.ws.model.item.UpdateTestItemRQ) IssueDefinition(com.epam.ta.reportportal.ws.model.issue.IssueDefinition) Matchers.hasSize(org.hamcrest.Matchers.hasSize) APPLICATION_JSON(org.springframework.http.MediaType.APPLICATION_JSON) TestItemRepository(com.epam.ta.reportportal.dao.TestItemRepository) SuggestInfo(com.epam.ta.reportportal.core.analyzer.auto.client.model.SuggestInfo) Launch(com.epam.ta.reportportal.entity.launch.Launch) TestItemIssueGroup(com.epam.ta.reportportal.entity.enums.TestItemIssueGroup) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) ReportPortalException(com.epam.ta.reportportal.exception.ReportPortalException) Mockito.times(org.mockito.Mockito.times) BaseMvcTest(com.epam.ta.reportportal.ws.BaseMvcTest) Sql(org.springframework.test.context.jdbc.Sql) MockMvcRequestBuilders(org.springframework.test.web.servlet.request.MockMvcRequestBuilders) LinkExternalIssueRQ(com.epam.ta.reportportal.ws.model.item.LinkExternalIssueRQ) Sets(com.google.common.collect.Sets) ZoneId(java.time.ZoneId) Mockito.verify(org.mockito.Mockito.verify) Test(org.junit.jupiter.api.Test) LaunchRepository(com.epam.ta.reportportal.dao.LaunchRepository) Assertions(org.junit.jupiter.api.Assertions) ItemAttributeResource(com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource) UpdateItemAttributeRQ(com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ) BulkInfoUpdateRQ(com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ) TestItem(com.epam.ta.reportportal.entity.item.TestItem) BaseMvcTest(com.epam.ta.reportportal.ws.BaseMvcTest) Test(org.junit.jupiter.api.Test)

Example 2 with UpdateItemAttributeRQ

use of com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ in project service-api by reportportal.

the class TestItemControllerTest method bulkDeleteAttributes.

@Test
void bulkDeleteAttributes() throws Exception {
    BulkInfoUpdateRQ request = new BulkInfoUpdateRQ();
    List<Long> launchIds = Arrays.asList(1L, 2L, 3L, 4L, 5L, 6L);
    request.setIds(launchIds);
    BulkInfoUpdateRQ.Description description = new BulkInfoUpdateRQ.Description();
    description.setAction(BulkInfoUpdateRQ.Action.CREATE);
    String comment = "created";
    description.setComment(comment);
    request.setDescription(description);
    UpdateItemAttributeRQ updateItemAttributeRQ = new UpdateItemAttributeRQ();
    updateItemAttributeRQ.setAction(BulkInfoUpdateRQ.Action.DELETE);
    updateItemAttributeRQ.setFrom(new ItemAttributeResource("testKey", "testValue"));
    request.setAttributes(Lists.newArrayList(updateItemAttributeRQ));
    mockMvc.perform(put(DEFAULT_PROJECT_BASE_URL + "/item/info").with(token(oAuthHelper.getDefaultToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(request))).andExpect(status().isOk());
    List<TestItem> items = testItemRepository.findAllById(launchIds);
    items.forEach(it -> testItemRepository.refresh(it));
    items.forEach(it -> {
        assertTrue(it.getAttributes().stream().noneMatch(attr -> "testKey".equals(attr.getKey()) && attr.getValue().equals("testValue") && !attr.isSystem()));
        assertEquals(comment, it.getDescription());
    });
}
Also used : StatusEnum(com.epam.ta.reportportal.entity.enums.StatusEnum) java.util(java.util) ArgumentMatchers(org.mockito.ArgumentMatchers) MockMvcResultMatchers.jsonPath(org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath) Issue(com.epam.ta.reportportal.ws.model.issue.Issue) TestItem(com.epam.ta.reportportal.entity.item.TestItem) BulkInfoUpdateRQ(com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ) LocalDateTime(java.time.LocalDateTime) Autowired(org.springframework.beans.factory.annotation.Autowired) DefineIssueRQ(com.epam.ta.reportportal.ws.model.issue.DefineIssueRQ) UnlinkExternalIssueRQ(com.epam.ta.reportportal.ws.model.item.UnlinkExternalIssueRQ) ParameterResource(com.epam.ta.reportportal.ws.model.ParameterResource) ItemAttributeResource(com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource) FinishTestItemRQ(com.epam.ta.reportportal.ws.model.FinishTestItemRQ) StartTestItemRQ(com.epam.ta.reportportal.ws.model.StartTestItemRQ) Lists(com.google.common.collect.Lists) ImmutableList(com.google.common.collect.ImmutableList) MockMvcResultMatchers.status(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status) UpdateItemAttributeRQ(com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ) UpdateTestItemRQ(com.epam.ta.reportportal.ws.model.item.UpdateTestItemRQ) IssueDefinition(com.epam.ta.reportportal.ws.model.issue.IssueDefinition) Matchers.hasSize(org.hamcrest.Matchers.hasSize) APPLICATION_JSON(org.springframework.http.MediaType.APPLICATION_JSON) TestItemRepository(com.epam.ta.reportportal.dao.TestItemRepository) SuggestInfo(com.epam.ta.reportportal.core.analyzer.auto.client.model.SuggestInfo) Launch(com.epam.ta.reportportal.entity.launch.Launch) TestItemIssueGroup(com.epam.ta.reportportal.entity.enums.TestItemIssueGroup) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) ReportPortalException(com.epam.ta.reportportal.exception.ReportPortalException) Mockito.times(org.mockito.Mockito.times) BaseMvcTest(com.epam.ta.reportportal.ws.BaseMvcTest) Sql(org.springframework.test.context.jdbc.Sql) MockMvcRequestBuilders(org.springframework.test.web.servlet.request.MockMvcRequestBuilders) LinkExternalIssueRQ(com.epam.ta.reportportal.ws.model.item.LinkExternalIssueRQ) Sets(com.google.common.collect.Sets) ZoneId(java.time.ZoneId) Mockito.verify(org.mockito.Mockito.verify) Test(org.junit.jupiter.api.Test) LaunchRepository(com.epam.ta.reportportal.dao.LaunchRepository) Assertions(org.junit.jupiter.api.Assertions) ItemAttributeResource(com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource) UpdateItemAttributeRQ(com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ) BulkInfoUpdateRQ(com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ) TestItem(com.epam.ta.reportportal.entity.item.TestItem) BaseMvcTest(com.epam.ta.reportportal.ws.BaseMvcTest) Test(org.junit.jupiter.api.Test)

Example 3 with UpdateItemAttributeRQ

use of com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ in project service-api by reportportal.

the class TestItemControllerTest method bulkCreateAttributes.

@Test
void bulkCreateAttributes() throws Exception {
    BulkInfoUpdateRQ request = new BulkInfoUpdateRQ();
    List<Long> launchIds = Arrays.asList(1L, 2L, 3L, 4L, 5L, 6L);
    request.setIds(launchIds);
    BulkInfoUpdateRQ.Description description = new BulkInfoUpdateRQ.Description();
    description.setAction(BulkInfoUpdateRQ.Action.UPDATE);
    String comment = "updated";
    description.setComment(comment);
    request.setDescription(description);
    UpdateItemAttributeRQ updateItemAttributeRQ = new UpdateItemAttributeRQ();
    updateItemAttributeRQ.setAction(BulkInfoUpdateRQ.Action.CREATE);
    updateItemAttributeRQ.setTo(new ItemAttributeResource("createdKey", "createdValue"));
    request.setAttributes(Lists.newArrayList(updateItemAttributeRQ));
    mockMvc.perform(put(DEFAULT_PROJECT_BASE_URL + "/item/info").with(token(oAuthHelper.getDefaultToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(request))).andExpect(status().isOk());
    List<TestItem> items = testItemRepository.findAllById(launchIds);
    items.forEach(it -> testItemRepository.refresh(it));
    items.forEach(it -> {
        assertTrue(it.getAttributes().stream().anyMatch(attr -> "createdKey".equals(attr.getKey()) && attr.getValue().equals("createdValue") && !attr.isSystem()));
        assertTrue(it.getDescription().length() > comment.length() && it.getDescription().contains(comment));
    });
}
Also used : StatusEnum(com.epam.ta.reportportal.entity.enums.StatusEnum) java.util(java.util) ArgumentMatchers(org.mockito.ArgumentMatchers) MockMvcResultMatchers.jsonPath(org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath) Issue(com.epam.ta.reportportal.ws.model.issue.Issue) TestItem(com.epam.ta.reportportal.entity.item.TestItem) BulkInfoUpdateRQ(com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ) LocalDateTime(java.time.LocalDateTime) Autowired(org.springframework.beans.factory.annotation.Autowired) DefineIssueRQ(com.epam.ta.reportportal.ws.model.issue.DefineIssueRQ) UnlinkExternalIssueRQ(com.epam.ta.reportportal.ws.model.item.UnlinkExternalIssueRQ) ParameterResource(com.epam.ta.reportportal.ws.model.ParameterResource) ItemAttributeResource(com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource) FinishTestItemRQ(com.epam.ta.reportportal.ws.model.FinishTestItemRQ) StartTestItemRQ(com.epam.ta.reportportal.ws.model.StartTestItemRQ) Lists(com.google.common.collect.Lists) ImmutableList(com.google.common.collect.ImmutableList) MockMvcResultMatchers.status(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status) UpdateItemAttributeRQ(com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ) UpdateTestItemRQ(com.epam.ta.reportportal.ws.model.item.UpdateTestItemRQ) IssueDefinition(com.epam.ta.reportportal.ws.model.issue.IssueDefinition) Matchers.hasSize(org.hamcrest.Matchers.hasSize) APPLICATION_JSON(org.springframework.http.MediaType.APPLICATION_JSON) TestItemRepository(com.epam.ta.reportportal.dao.TestItemRepository) SuggestInfo(com.epam.ta.reportportal.core.analyzer.auto.client.model.SuggestInfo) Launch(com.epam.ta.reportportal.entity.launch.Launch) TestItemIssueGroup(com.epam.ta.reportportal.entity.enums.TestItemIssueGroup) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) ReportPortalException(com.epam.ta.reportportal.exception.ReportPortalException) Mockito.times(org.mockito.Mockito.times) BaseMvcTest(com.epam.ta.reportportal.ws.BaseMvcTest) Sql(org.springframework.test.context.jdbc.Sql) MockMvcRequestBuilders(org.springframework.test.web.servlet.request.MockMvcRequestBuilders) LinkExternalIssueRQ(com.epam.ta.reportportal.ws.model.item.LinkExternalIssueRQ) Sets(com.google.common.collect.Sets) ZoneId(java.time.ZoneId) Mockito.verify(org.mockito.Mockito.verify) Test(org.junit.jupiter.api.Test) LaunchRepository(com.epam.ta.reportportal.dao.LaunchRepository) Assertions(org.junit.jupiter.api.Assertions) ItemAttributeResource(com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource) UpdateItemAttributeRQ(com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ) BulkInfoUpdateRQ(com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ) TestItem(com.epam.ta.reportportal.entity.item.TestItem) BaseMvcTest(com.epam.ta.reportportal.ws.BaseMvcTest) Test(org.junit.jupiter.api.Test)

Example 4 with UpdateItemAttributeRQ

use of com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ in project service-api by reportportal.

the class LaunchControllerTest method bulkUpdateItemAttributes.

@Test
void bulkUpdateItemAttributes() throws Exception {
    BulkInfoUpdateRQ request = new BulkInfoUpdateRQ();
    List<Long> launchIds = Arrays.asList(1L, 2L, 3L, 4L);
    request.setIds(launchIds);
    BulkInfoUpdateRQ.Description description = new BulkInfoUpdateRQ.Description();
    description.setAction(BulkInfoUpdateRQ.Action.CREATE);
    String comment = "created";
    description.setComment(comment);
    request.setDescription(description);
    UpdateItemAttributeRQ updateItemAttributeRQ = new UpdateItemAttributeRQ();
    updateItemAttributeRQ.setAction(BulkInfoUpdateRQ.Action.UPDATE);
    updateItemAttributeRQ.setFrom(new ItemAttributeResource("testKey", "testValue"));
    updateItemAttributeRQ.setTo(new ItemAttributeResource("updatedKey", "updatedValue"));
    request.setAttributes(Lists.newArrayList(updateItemAttributeRQ));
    mockMvc.perform(put(DEFAULT_PROJECT_BASE_URL + "/launch/info").with(token(oAuthHelper.getDefaultToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(request))).andExpect(status().isOk());
    List<Launch> launches = launchRepository.findAllById(launchIds);
    launches.forEach(it -> launchRepository.refresh(it));
    launches.forEach(it -> {
        assertTrue(it.getAttributes().stream().noneMatch(attr -> "testKey".equals(attr.getKey()) && attr.getValue().equals("testValue") && !attr.isSystem()));
        assertTrue(it.getAttributes().stream().anyMatch(attr -> "updatedKey".equals(attr.getKey()) && attr.getValue().equals("updatedValue") && !attr.isSystem()));
        assertEquals(comment, it.getDescription());
    });
}
Also used : UpdateLaunchRQ(com.epam.ta.reportportal.ws.model.launch.UpdateLaunchRQ) StatusEnum(com.epam.ta.reportportal.entity.enums.StatusEnum) CRITERIA_PROJECT_ID(com.epam.ta.reportportal.commons.querygen.constant.GeneralCriteriaConstant.CRITERIA_PROJECT_ID) java.util(java.util) MockMvcResultMatchers.jsonPath(org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath) DeleteBulkRQ(com.epam.ta.reportportal.ws.model.DeleteBulkRQ) BulkInfoUpdateRQ(com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ) BulkRQ(com.epam.ta.reportportal.ws.model.BulkRQ) LocalDateTime(java.time.LocalDateTime) Autowired(org.springframework.beans.factory.annotation.Autowired) DEFAULT(com.epam.ta.reportportal.ws.model.launch.Mode.DEFAULT) ItemAttributeResource(com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource) Lists(com.google.common.collect.Lists) Collectors.toMap(java.util.stream.Collectors.toMap) MockMvcResultMatchers.status(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status) UpdateItemAttributeRQ(com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ) Matchers.hasSize(org.hamcrest.Matchers.hasSize) APPLICATION_JSON(org.springframework.http.MediaType.APPLICATION_JSON) MergeLaunchesRQ(com.epam.ta.reportportal.ws.model.launch.MergeLaunchesRQ) Launch(com.epam.ta.reportportal.entity.launch.Launch) FinishExecutionRQ(com.epam.ta.reportportal.ws.model.FinishExecutionRQ) DEBUG(com.epam.ta.reportportal.ws.model.launch.Mode.DEBUG) Filter(com.epam.ta.reportportal.commons.querygen.Filter) LaunchModeEnum(com.epam.ta.reportportal.entity.enums.LaunchModeEnum) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) ReportPortalException(com.epam.ta.reportportal.exception.ReportPortalException) BaseMvcTest(com.epam.ta.reportportal.ws.BaseMvcTest) FilterCondition(com.epam.ta.reportportal.commons.querygen.FilterCondition) Sql(org.springframework.test.context.jdbc.Sql) Collectors(java.util.stream.Collectors) MockMvcRequestBuilders(org.springframework.test.web.servlet.request.MockMvcRequestBuilders) Sets(com.google.common.collect.Sets) ZoneId(java.time.ZoneId) AnalyzeLaunchRQ(com.epam.ta.reportportal.ws.model.launch.AnalyzeLaunchRQ) Test(org.junit.jupiter.api.Test) ItemAttributesRQ(com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ) Stream(java.util.stream.Stream) StartLaunchRQ(com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ) LaunchRepository(com.epam.ta.reportportal.dao.LaunchRepository) Assertions(org.junit.jupiter.api.Assertions) ItemAttributeResource(com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource) UpdateItemAttributeRQ(com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ) BulkInfoUpdateRQ(com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ) Launch(com.epam.ta.reportportal.entity.launch.Launch) BaseMvcTest(com.epam.ta.reportportal.ws.BaseMvcTest) Test(org.junit.jupiter.api.Test)

Example 5 with UpdateItemAttributeRQ

use of com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ in project service-api by reportportal.

the class LaunchControllerTest method bulkDeleteAttributes.

@Test
void bulkDeleteAttributes() throws Exception {
    BulkInfoUpdateRQ request = new BulkInfoUpdateRQ();
    List<Long> launchIds = Arrays.asList(1L, 2L, 3L, 4L);
    request.setIds(launchIds);
    BulkInfoUpdateRQ.Description description = new BulkInfoUpdateRQ.Description();
    description.setAction(BulkInfoUpdateRQ.Action.CREATE);
    String comment = "created";
    description.setComment(comment);
    request.setDescription(description);
    UpdateItemAttributeRQ updateItemAttributeRQ = new UpdateItemAttributeRQ();
    updateItemAttributeRQ.setAction(BulkInfoUpdateRQ.Action.DELETE);
    updateItemAttributeRQ.setFrom(new ItemAttributeResource("testKey", "testValue"));
    request.setAttributes(Lists.newArrayList(updateItemAttributeRQ));
    mockMvc.perform(put(DEFAULT_PROJECT_BASE_URL + "/launch/info").with(token(oAuthHelper.getDefaultToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(request))).andExpect(status().isOk());
    List<Launch> launches = launchRepository.findAllById(launchIds);
    launches.forEach(it -> launchRepository.refresh(it));
    launches.forEach(it -> {
        assertTrue(it.getAttributes().stream().noneMatch(attr -> "testKey".equals(attr.getKey()) && attr.getValue().equals("testValue") && !attr.isSystem()));
        assertEquals(comment, it.getDescription());
    });
}
Also used : UpdateLaunchRQ(com.epam.ta.reportportal.ws.model.launch.UpdateLaunchRQ) StatusEnum(com.epam.ta.reportportal.entity.enums.StatusEnum) CRITERIA_PROJECT_ID(com.epam.ta.reportportal.commons.querygen.constant.GeneralCriteriaConstant.CRITERIA_PROJECT_ID) java.util(java.util) MockMvcResultMatchers.jsonPath(org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath) DeleteBulkRQ(com.epam.ta.reportportal.ws.model.DeleteBulkRQ) BulkInfoUpdateRQ(com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ) BulkRQ(com.epam.ta.reportportal.ws.model.BulkRQ) LocalDateTime(java.time.LocalDateTime) Autowired(org.springframework.beans.factory.annotation.Autowired) DEFAULT(com.epam.ta.reportportal.ws.model.launch.Mode.DEFAULT) ItemAttributeResource(com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource) Lists(com.google.common.collect.Lists) Collectors.toMap(java.util.stream.Collectors.toMap) MockMvcResultMatchers.status(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status) UpdateItemAttributeRQ(com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ) Matchers.hasSize(org.hamcrest.Matchers.hasSize) APPLICATION_JSON(org.springframework.http.MediaType.APPLICATION_JSON) MergeLaunchesRQ(com.epam.ta.reportportal.ws.model.launch.MergeLaunchesRQ) Launch(com.epam.ta.reportportal.entity.launch.Launch) FinishExecutionRQ(com.epam.ta.reportportal.ws.model.FinishExecutionRQ) DEBUG(com.epam.ta.reportportal.ws.model.launch.Mode.DEBUG) Filter(com.epam.ta.reportportal.commons.querygen.Filter) LaunchModeEnum(com.epam.ta.reportportal.entity.enums.LaunchModeEnum) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) ReportPortalException(com.epam.ta.reportportal.exception.ReportPortalException) BaseMvcTest(com.epam.ta.reportportal.ws.BaseMvcTest) FilterCondition(com.epam.ta.reportportal.commons.querygen.FilterCondition) Sql(org.springframework.test.context.jdbc.Sql) Collectors(java.util.stream.Collectors) MockMvcRequestBuilders(org.springframework.test.web.servlet.request.MockMvcRequestBuilders) Sets(com.google.common.collect.Sets) ZoneId(java.time.ZoneId) AnalyzeLaunchRQ(com.epam.ta.reportportal.ws.model.launch.AnalyzeLaunchRQ) Test(org.junit.jupiter.api.Test) ItemAttributesRQ(com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ) Stream(java.util.stream.Stream) StartLaunchRQ(com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ) LaunchRepository(com.epam.ta.reportportal.dao.LaunchRepository) Assertions(org.junit.jupiter.api.Assertions) ItemAttributeResource(com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource) UpdateItemAttributeRQ(com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ) BulkInfoUpdateRQ(com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ) Launch(com.epam.ta.reportportal.entity.launch.Launch) BaseMvcTest(com.epam.ta.reportportal.ws.BaseMvcTest) Test(org.junit.jupiter.api.Test)

Aggregations

LaunchRepository (com.epam.ta.reportportal.dao.LaunchRepository)6 StatusEnum (com.epam.ta.reportportal.entity.enums.StatusEnum)6 Launch (com.epam.ta.reportportal.entity.launch.Launch)6 ReportPortalException (com.epam.ta.reportportal.exception.ReportPortalException)6 BaseMvcTest (com.epam.ta.reportportal.ws.BaseMvcTest)6 BulkInfoUpdateRQ (com.epam.ta.reportportal.ws.model.BulkInfoUpdateRQ)6 ItemAttributeResource (com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource)6 UpdateItemAttributeRQ (com.epam.ta.reportportal.ws.model.attribute.UpdateItemAttributeRQ)6 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)6 Lists (com.google.common.collect.Lists)6 Sets (com.google.common.collect.Sets)6 LocalDateTime (java.time.LocalDateTime)6 ZoneId (java.time.ZoneId)6 java.util (java.util)6 Matchers.hasSize (org.hamcrest.Matchers.hasSize)6 Assertions (org.junit.jupiter.api.Assertions)6 Test (org.junit.jupiter.api.Test)6 Autowired (org.springframework.beans.factory.annotation.Autowired)6 APPLICATION_JSON (org.springframework.http.MediaType.APPLICATION_JSON)6 Sql (org.springframework.test.context.jdbc.Sql)6