Search in sources :

Example 6 with PipelinePart

use of com.epam.ta.reportportal.pipeline.PipelinePart in project service-api by reportportal.

the class SaveLastRunAttributePartProviderTest method shouldUpdateWhenExists.

@Test
void shouldUpdateWhenExists() {
    final GenerateClustersConfig config = getConfig(false);
    final ItemAttribute itemAttribute = new ItemAttribute();
    when(itemAttributeRepository.findByLaunchIdAndKeyAndSystem(config.getLaunchId(), RP_CLUSTER_LAST_RUN_KEY, true)).thenReturn(Optional.of(itemAttribute));
    final PipelinePart pipelinePart = provider.provide(config);
    pipelinePart.handle();
    verify(itemAttributeRepository, times(1)).save(itemAttribute);
}
Also used : ItemAttribute(com.epam.ta.reportportal.entity.ItemAttribute) PipelinePart(com.epam.ta.reportportal.pipeline.PipelinePart) GenerateClustersConfig(com.epam.ta.reportportal.core.analyzer.auto.client.model.cluster.GenerateClustersConfig) Test(org.junit.jupiter.api.Test)

Aggregations

GenerateClustersConfig (com.epam.ta.reportportal.core.analyzer.auto.client.model.cluster.GenerateClustersConfig)6 PipelinePart (com.epam.ta.reportportal.pipeline.PipelinePart)6 Test (org.junit.jupiter.api.Test)6 ClusterData (com.epam.ta.reportportal.core.analyzer.auto.client.model.cluster.ClusterData)2 ItemAttribute (com.epam.ta.reportportal.entity.ItemAttribute)1