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);
}
Aggregations