Improve autowiring for tests (Sonar) (#2217)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-01-22 15:20:57 +02:00
committed by GitHub
parent 3d390b9ad7
commit 4909a65d8c
14 changed files with 168 additions and 177 deletions

View File

@@ -57,8 +57,9 @@ class BusProtoStuffMessageConverterTest {
// deserialize // deserialize
when(messageMock.getPayload()).thenReturn(serializedEvent); when(messageMock.getPayload()).thenReturn(serializedEvent);
final Object deserializedEvent = underTest.convertFromInternal(messageMock, RemoteApplicationEvent.class, null); final Object deserializedEvent = underTest.convertFromInternal(messageMock, RemoteApplicationEvent.class, null);
assertThat(deserializedEvent).isInstanceOf(TargetCreatedEvent.class); assertThat(deserializedEvent)
assertThat(deserializedEvent).isEqualTo(targetCreatedEvent); .isInstanceOf(TargetCreatedEvent.class)
.isEqualTo(targetCreatedEvent);
} }
@Test @Test

View File

@@ -26,6 +26,7 @@ import org.eclipse.hawkbit.repository.event.remote.CancelTargetAssignmentEvent;
import org.eclipse.hawkbit.repository.event.remote.entity.TargetUpdatedEvent; import org.eclipse.hawkbit.repository.event.remote.entity.TargetUpdatedEvent;
import org.eclipse.hawkbit.repository.jpa.configuration.Constants; import org.eclipse.hawkbit.repository.jpa.configuration.Constants;
import org.eclipse.hawkbit.repository.jpa.executor.AfterTransactionCommitExecutor; import org.eclipse.hawkbit.repository.jpa.executor.AfterTransactionCommitExecutor;
import org.eclipse.hawkbit.repository.jpa.model.AbstractJpaBaseEntity_;
import org.eclipse.hawkbit.repository.jpa.model.JpaAction; import org.eclipse.hawkbit.repository.jpa.model.JpaAction;
import org.eclipse.hawkbit.repository.jpa.model.JpaActionStatus; import org.eclipse.hawkbit.repository.jpa.model.JpaActionStatus;
import org.eclipse.hawkbit.repository.jpa.model.JpaAction_; import org.eclipse.hawkbit.repository.jpa.model.JpaAction_;
@@ -60,12 +61,14 @@ public abstract class AbstractDsAssignmentStrategy {
protected final AfterTransactionCommitExecutor afterCommit; protected final AfterTransactionCommitExecutor afterCommit;
protected final EventPublisherHolder eventPublisherHolder; protected final EventPublisherHolder eventPublisherHolder;
protected final ActionRepository actionRepository; protected final ActionRepository actionRepository;
private final ActionStatusRepository actionStatusRepository; private final ActionStatusRepository actionStatusRepository;
private final QuotaManagement quotaManagement; private final QuotaManagement quotaManagement;
private final BooleanSupplier multiAssignmentsConfig; private final BooleanSupplier multiAssignmentsConfig;
private final BooleanSupplier confirmationFlowConfig; private final BooleanSupplier confirmationFlowConfig;
private final RepositoryProperties repositoryProperties; private final RepositoryProperties repositoryProperties;
@SuppressWarnings("java:S107")
AbstractDsAssignmentStrategy( AbstractDsAssignmentStrategy(
final TargetRepository targetRepository, final TargetRepository targetRepository,
final AfterTransactionCommitExecutor afterCommit, final EventPublisherHolder eventPublisherHolder, final AfterTransactionCommitExecutor afterCommit, final EventPublisherHolder eventPublisherHolder,
@@ -149,7 +152,7 @@ public abstract class AbstractDsAssignmentStrategy {
cb.equal(root.get(JpaAction_.active), true), cb.equal(root.get(JpaAction_.active), true),
cb.equal(root.get(JpaAction_.distributionSet).get(JpaDistributionSet_.requiredMigrationStep), false), cb.equal(root.get(JpaAction_.distributionSet).get(JpaDistributionSet_.requiredMigrationStep), false),
cb.notEqual(root.get(JpaAction_.status), Action.Status.CANCELING), cb.notEqual(root.get(JpaAction_.status), Action.Status.CANCELING),
root.get(JpaAction_.target).get(JpaTarget_.id).in(targetsIds) root.get(JpaAction_.target).get(AbstractJpaBaseEntity_.id).in(targetsIds)
); );
}); });
@@ -187,7 +190,7 @@ public abstract class AbstractDsAssignmentStrategy {
return cb.and( return cb.and(
cb.equal(root.get(JpaAction_.active), true), cb.equal(root.get(JpaAction_.active), true),
cb.equal(root.get(JpaAction_.distributionSet).get(JpaDistributionSet_.requiredMigrationStep), false), cb.equal(root.get(JpaAction_.distributionSet).get(JpaDistributionSet_.requiredMigrationStep), false),
root.get(JpaAction_.target).get(JpaTarget_.id).in(targetsIds) root.get(JpaAction_.target).get(AbstractJpaBaseEntity_.id).in(targetsIds)
); );
}); });

View File

@@ -37,6 +37,7 @@ import org.springframework.util.MimeTypeUtils;
/** /**
* Test the remote entity events. * Test the remote entity events.
*/ */
@SuppressWarnings("java:S6813") // constructor injects are not possible for test classes
public abstract class AbstractRemoteEventTest extends AbstractJpaIntegrationTest { public abstract class AbstractRemoteEventTest extends AbstractJpaIntegrationTest {
@Autowired @Autowired

View File

@@ -78,6 +78,7 @@ import org.springframework.transaction.annotation.Transactional;
@ContextConfiguration(classes = { RepositoryApplicationConfiguration.class, TestConfiguration.class }) @ContextConfiguration(classes = { RepositoryApplicationConfiguration.class, TestConfiguration.class })
@Import(TestChannelBinderConfiguration.class) @Import(TestChannelBinderConfiguration.class)
@TestPropertySource(locations = "classpath:/jpa-test.properties") @TestPropertySource(locations = "classpath:/jpa-test.properties")
@SuppressWarnings("java:S6813") // constructor injects are not possible for test classes
public abstract class AbstractJpaIntegrationTest extends AbstractIntegrationTest { public abstract class AbstractJpaIntegrationTest extends AbstractIntegrationTest {
protected static final String INVALID_TEXT_HTML = "</noscript><br><script>"; protected static final String INVALID_TEXT_HTML = "</noscript><br><script>";
@@ -91,58 +92,40 @@ public abstract class AbstractJpaIntegrationTest extends AbstractIntegrationTest
@Autowired @Autowired
protected TargetRepository targetRepository; protected TargetRepository targetRepository;
@Autowired @Autowired
protected ActionRepository actionRepository; protected ActionRepository actionRepository;
@Autowired @Autowired
protected DistributionSetRepository distributionSetRepository; protected DistributionSetRepository distributionSetRepository;
@Autowired @Autowired
protected SoftwareModuleRepository softwareModuleRepository; protected SoftwareModuleRepository softwareModuleRepository;
@Autowired @Autowired
protected TenantMetaDataRepository tenantMetaDataRepository; protected TenantMetaDataRepository tenantMetaDataRepository;
@Autowired @Autowired
protected DistributionSetTypeRepository distributionSetTypeRepository; protected DistributionSetTypeRepository distributionSetTypeRepository;
@Autowired @Autowired
protected SoftwareModuleTypeRepository softwareModuleTypeRepository; protected SoftwareModuleTypeRepository softwareModuleTypeRepository;
@Autowired @Autowired
protected TargetTagRepository targetTagRepository; protected TargetTagRepository targetTagRepository;
@Autowired @Autowired
protected TargetTypeRepository targetTypeRepository; protected TargetTypeRepository targetTypeRepository;
@Autowired @Autowired
protected DistributionSetTagRepository distributionSetTagRepository; protected DistributionSetTagRepository distributionSetTagRepository;
@Autowired @Autowired
protected SoftwareModuleMetadataRepository softwareModuleMetadataRepository; protected SoftwareModuleMetadataRepository softwareModuleMetadataRepository;
@Autowired @Autowired
protected ActionStatusRepository actionStatusRepository; protected ActionStatusRepository actionStatusRepository;
@Autowired @Autowired
protected LocalArtifactRepository artifactRepository; protected LocalArtifactRepository artifactRepository;
@Autowired @Autowired
protected RolloutGroupRepository rolloutGroupRepository; protected RolloutGroupRepository rolloutGroupRepository;
@Autowired @Autowired
protected RolloutTargetGroupRepository rolloutTargetGroupRepository; protected RolloutTargetGroupRepository rolloutTargetGroupRepository;
@Autowired @Autowired
protected RolloutRepository rolloutRepository; protected RolloutRepository rolloutRepository;
@Autowired @Autowired
protected TenantConfigurationProperties tenantConfigurationProperties; protected TenantConfigurationProperties tenantConfigurationProperties;
@Autowired @Autowired
protected RolloutTestApprovalStrategy approvalStrategy; protected RolloutTestApprovalStrategy approvalStrategy;
@Autowired @Autowired
private JpaProperties jpaProperties; private JpaProperties jpaProperties;

View File

@@ -52,6 +52,7 @@ import org.springframework.data.domain.Slice;
*/ */
@Feature("Component Tests - Repository") @Feature("Component Tests - Repository")
@Story("Auto assign checker") @Story("Auto assign checker")
@SuppressWarnings("java:S6813") // constructor injects are not possible for test classes
class AutoAssignCheckerIntTest extends AbstractJpaIntegrationTest { class AutoAssignCheckerIntTest extends AbstractJpaIntegrationTest {
private static final String SPACE_AND_DESCRIPTION = " description"; private static final String SPACE_AND_DESCRIPTION = " description";

View File

@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
*/ */
@Feature("Component Tests - Repository") @Feature("Component Tests - Repository")
@Story("Action cleanup handler") @Story("Action cleanup handler")
@SuppressWarnings("java:S6813") // constructor injects are not possible for test classes
class AutoActionCleanupTest extends AbstractJpaIntegrationTest { class AutoActionCleanupTest extends AbstractJpaIntegrationTest {
@Autowired @Autowired

View File

@@ -28,6 +28,7 @@ import org.springframework.integration.support.locks.LockRegistry;
*/ */
@Feature("Component Tests - Repository") @Feature("Component Tests - Repository")
@Story("Auto cleanup scheduler") @Story("Auto cleanup scheduler")
@SuppressWarnings("java:S6813") // constructor injects are not possible for test classes
class AutoCleanupSchedulerTest extends AbstractJpaIntegrationTest { class AutoCleanupSchedulerTest extends AbstractJpaIntegrationTest {
private final AtomicInteger counter = new AtomicInteger(); private final AtomicInteger counter = new AtomicInteger();

View File

@@ -50,6 +50,7 @@ import org.springframework.context.event.EventListener;
@Feature("Component Tests - Repository") @Feature("Component Tests - Repository")
@Story("Entity Events") @Story("Entity Events")
@SpringBootTest(classes = { RepositoryTestConfiguration.class }, webEnvironment = SpringBootTest.WebEnvironment.NONE) @SpringBootTest(classes = { RepositoryTestConfiguration.class }, webEnvironment = SpringBootTest.WebEnvironment.NONE)
@SuppressWarnings("java:S6813") // constructor injects are not possible for test classes
public class RepositoryEntityEventTest extends AbstractJpaIntegrationTest { public class RepositoryEntityEventTest extends AbstractJpaIntegrationTest {
@Autowired @Autowired

View File

@@ -16,7 +16,6 @@ import java.time.Instant;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import io.qameta.allure.Description; import io.qameta.allure.Description;

View File

@@ -1283,7 +1283,7 @@ class DeploymentManagementTest extends AbstractJpaIntegrationTest {
.asList(DistributionSetSpecification.isDeleted(true), DistributionSetSpecification.isCompleted(true))), .asList(DistributionSetSpecification.isDeleted(true), DistributionSetSpecification.isCompleted(true))),
PAGE).getContent()).as("wrong size of founded ds").hasSize(noOfDistributionSets); PAGE).getContent()).as("wrong size of founded ds").hasSize(noOfDistributionSets);
for (final DistributionSet ds : deploymentResult.getDistributionSets()) { for (final DistributionSet ignored : deploymentResult.getDistributionSets()) {
testdataFactory.sendUpdateActionStatusToTargets(deploymentResult.getDeployedTargets(), Status.FINISHED, testdataFactory.sendUpdateActionStatusToTargets(deploymentResult.getDeployedTargets(), Status.FINISHED,
Collections.singletonList("blabla alles gut")); Collections.singletonList("blabla alles gut"));
} }
@@ -1316,7 +1316,7 @@ class DeploymentManagementTest extends AbstractJpaIntegrationTest {
final DeploymentResult deploymentResult = prepareComplexRepo(undeployedTargetPrefix, noOfUndeployedTargets, final DeploymentResult deploymentResult = prepareComplexRepo(undeployedTargetPrefix, noOfUndeployedTargets,
deployedTargetPrefix, noOfDeployedTargets, noOfDistributionSets, "myTestDS"); deployedTargetPrefix, noOfDeployedTargets, noOfDistributionSets, "myTestDS");
for (final DistributionSet ds : deploymentResult.getDistributionSets()) { for (final DistributionSet ignored : deploymentResult.getDistributionSets()) {
testdataFactory.sendUpdateActionStatusToTargets(deploymentResult.getDeployedTargets(), Status.FINISHED, testdataFactory.sendUpdateActionStatusToTargets(deploymentResult.getDeployedTargets(), Status.FINISHED,
Collections.singletonList("blabla alles gut")); Collections.singletonList("blabla alles gut"));
} }

View File

@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
@Feature("Component Tests - Repository") @Feature("Component Tests - Repository")
@Story("RSQL filter suggestion") @Story("RSQL filter suggestion")
@SuppressWarnings("java:S6813") // constructor injects are not possible for test classes
public class RSQLParserValidationOracleTest extends AbstractJpaIntegrationTest { public class RSQLParserValidationOracleTest extends AbstractJpaIntegrationTest {
private static final String[] OP_SUGGESTIONS = new String[] { "==", "!=", "=ge=", "=le=", "=gt=", "=lt=", "=in=", private static final String[] OP_SUGGESTIONS = new String[] { "==", "!=", "=ge=", "=le=", "=gt=", "=lt=", "=in=",
@@ -35,6 +36,7 @@ public class RSQLParserValidationOracleTest extends AbstractJpaIntegrationTest {
.map(field -> field.name().toLowerCase()).toArray(String[]::new); .map(field -> field.name().toLowerCase()).toArray(String[]::new);
private static final String[] AND_OR_SUGGESTIONS = new String[] { "and", "or" }; private static final String[] AND_OR_SUGGESTIONS = new String[] { "and", "or" };
private static final String[] NAME_VERSION_SUGGESTIONS = new String[] { "name", "version" }; private static final String[] NAME_VERSION_SUGGESTIONS = new String[] { "name", "version" };
@Autowired @Autowired
private RsqlValidationOracle rsqlValidationOracle; private RsqlValidationOracle rsqlValidationOracle;

View File

@@ -25,8 +25,25 @@ import org.eclipse.hawkbit.artifact.repository.urlhandler.PropertyBasedArtifactU
import org.eclipse.hawkbit.cache.TenantAwareCacheManager; import org.eclipse.hawkbit.cache.TenantAwareCacheManager;
import org.eclipse.hawkbit.event.BusProtoStuffMessageConverter; import org.eclipse.hawkbit.event.BusProtoStuffMessageConverter;
import org.eclipse.hawkbit.im.authentication.SpRole; import org.eclipse.hawkbit.im.authentication.SpRole;
import org.eclipse.hawkbit.repository.ArtifactManagement;
import org.eclipse.hawkbit.repository.ControllerManagement;
import org.eclipse.hawkbit.repository.DeploymentManagement;
import org.eclipse.hawkbit.repository.DistributionSetInvalidationManagement;
import org.eclipse.hawkbit.repository.DistributionSetManagement;
import org.eclipse.hawkbit.repository.DistributionSetTagManagement;
import org.eclipse.hawkbit.repository.DistributionSetTypeManagement;
import org.eclipse.hawkbit.repository.EntityFactory;
import org.eclipse.hawkbit.repository.QuotaManagement;
import org.eclipse.hawkbit.repository.RolloutApprovalStrategy; import org.eclipse.hawkbit.repository.RolloutApprovalStrategy;
import org.eclipse.hawkbit.repository.RolloutHandler;
import org.eclipse.hawkbit.repository.RolloutManagement;
import org.eclipse.hawkbit.repository.RolloutStatusCache; import org.eclipse.hawkbit.repository.RolloutStatusCache;
import org.eclipse.hawkbit.repository.SoftwareModuleManagement;
import org.eclipse.hawkbit.repository.SoftwareModuleTypeManagement;
import org.eclipse.hawkbit.repository.TargetFilterQueryManagement;
import org.eclipse.hawkbit.repository.TargetManagement;
import org.eclipse.hawkbit.repository.TargetTagManagement;
import org.eclipse.hawkbit.repository.TargetTypeManagement;
import org.eclipse.hawkbit.repository.event.ApplicationEventFilter; import org.eclipse.hawkbit.repository.event.ApplicationEventFilter;
import org.eclipse.hawkbit.repository.model.helper.EventPublisherHolder; import org.eclipse.hawkbit.repository.model.helper.EventPublisherHolder;
import org.eclipse.hawkbit.repository.rsql.VirtualPropertyReplacer; import org.eclipse.hawkbit.repository.rsql.VirtualPropertyReplacer;
@@ -141,8 +158,22 @@ public class TestConfiguration implements AsyncConfigurer {
} }
@Bean @Bean
TestdataFactory testdataFactory() { TestdataFactory testdataFactory(
return new TestdataFactory(); final ControllerManagement controllerManagement, final ArtifactManagement artifactManagement,
final SoftwareModuleManagement softwareModuleManagement, final SoftwareModuleTypeManagement softwareModuleTypeManagement,
final DistributionSetManagement distributionSetManagement,
final DistributionSetInvalidationManagement distributionSetInvalidationManagement,
final DistributionSetTypeManagement distributionSetTypeManagement,
final TargetManagement targetManagement, final TargetFilterQueryManagement targetFilterQueryManagement,
final TargetTypeManagement targetTypeManagement, final TargetTagManagement targetTagManagement,
final DeploymentManagement deploymentManagement, final DistributionSetTagManagement distributionSetTagManagement,
final RolloutManagement rolloutManagement, final RolloutHandler rolloutHandler,
final QuotaManagement quotaManagement,
final EntityFactory entityFactory) {
return new TestdataFactory(controllerManagement, artifactManagement, softwareModuleManagement, softwareModuleTypeManagement,
distributionSetManagement, distributionSetInvalidationManagement, distributionSetTypeManagement, targetManagement,
targetFilterQueryManagement, targetTypeManagement, targetTagManagement, deploymentManagement,
distributionSetTagManagement, rolloutManagement, rolloutHandler, quotaManagement, entityFactory);
} }
@Bean @Bean

View File

@@ -107,6 +107,7 @@ import org.springframework.test.context.TestPropertySource;
listeners = { EventVerifier.class, CleanupTestExecutionListener.class }, listeners = { EventVerifier.class, CleanupTestExecutionListener.class },
mergeMode = MergeMode.MERGE_WITH_DEFAULTS) mergeMode = MergeMode.MERGE_WITH_DEFAULTS)
@TestPropertySource(properties = "spring.main.allow-bean-definition-overriding=true") @TestPropertySource(properties = "spring.main.allow-bean-definition-overriding=true")
@SuppressWarnings("java:S6813") // constructor injects are not possible for test classes
public abstract class AbstractIntegrationTest { public abstract class AbstractIntegrationTest {
protected static final Pageable PAGE = PageRequest.of(0, 500, Sort.by(Direction.ASC, "id")); protected static final Pageable PAGE = PageRequest.of(0, 500, Sort.by(Direction.ASC, "id"));
@@ -120,6 +121,7 @@ public abstract class AbstractIntegrationTest {
* {@link SystemManagement#getTenantMetadata()}; * {@link SystemManagement#getTenantMetadata()};
*/ */
protected static final int DEFAULT_DS_TYPES = RepositoryConstants.DEFAULT_DS_TYPES_IN_TENANT + 1; protected static final int DEFAULT_DS_TYPES = RepositoryConstants.DEFAULT_DS_TYPES_IN_TENANT + 1;
@Autowired @Autowired
protected EntityFactory entityFactory; protected EntityFactory entityFactory;
@Autowired @Autowired
@@ -478,6 +480,7 @@ public abstract class AbstractIntegrationTest {
} }
} }
@SuppressWarnings("java:S4042")
private static File createTempDir() { private static File createTempDir() {
try { try {
final File file = Files.createTempDirectory(System.currentTimeMillis() + "_").toFile(); final File file = Files.createTempDirectory(System.currentTimeMillis() + "_").toFile();

View File

@@ -78,7 +78,6 @@ import org.eclipse.hawkbit.repository.model.TargetFilterQuery;
import org.eclipse.hawkbit.repository.model.TargetTag; import org.eclipse.hawkbit.repository.model.TargetTag;
import org.eclipse.hawkbit.repository.model.TargetType; import org.eclipse.hawkbit.repository.model.TargetType;
import org.eclipse.hawkbit.repository.model.TargetUpdateStatus; import org.eclipse.hawkbit.repository.model.TargetUpdateStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
@@ -139,56 +138,54 @@ public class TestdataFactory {
private static final String SPACE_AND_DESCRIPTION = " description"; private static final String SPACE_AND_DESCRIPTION = " description";
@Autowired private final ControllerManagement controllerManagement;
private ControllerManagement controllerManagament; private final ArtifactManagement artifactManagement;
private final SoftwareModuleManagement softwareModuleManagement;
private final SoftwareModuleTypeManagement softwareModuleTypeManagement;
private final DistributionSetManagement distributionSetManagement;
private final DistributionSetInvalidationManagement distributionSetInvalidationManagement;
private final DistributionSetTypeManagement distributionSetTypeManagement;
private final TargetManagement targetManagement;
private final TargetFilterQueryManagement targetFilterQueryManagement;
private final TargetTypeManagement targetTypeManagement;
private final TargetTagManagement targetTagManagement;
private final DeploymentManagement deploymentManagement;
private final DistributionSetTagManagement distributionSetTagManagement;
private final RolloutManagement rolloutManagement;
private final RolloutHandler rolloutHandler;
private final QuotaManagement quotaManagement;
private final EntityFactory entityFactory;
@Autowired public TestdataFactory(
private SoftwareModuleManagement softwareModuleManagement; final ControllerManagement controllerManagement, final ArtifactManagement artifactManagement,
final SoftwareModuleManagement softwareModuleManagement, final SoftwareModuleTypeManagement softwareModuleTypeManagement,
@Autowired final DistributionSetManagement distributionSetManagement,
private SoftwareModuleTypeManagement softwareModuleTypeManagement; final DistributionSetInvalidationManagement distributionSetInvalidationManagement,
final DistributionSetTypeManagement distributionSetTypeManagement,
@Autowired final TargetManagement targetManagement, final TargetFilterQueryManagement targetFilterQueryManagement,
private DistributionSetManagement distributionSetManagement; final TargetTypeManagement targetTypeManagement, final TargetTagManagement targetTagManagement,
final DeploymentManagement deploymentManagement, final DistributionSetTagManagement distributionSetTagManagement,
@Autowired final RolloutManagement rolloutManagement, final RolloutHandler rolloutHandler,
private DistributionSetInvalidationManagement distributionSetInvalidationManagement; final QuotaManagement quotaManagement,
final EntityFactory entityFactory) {
@Autowired this.controllerManagement = controllerManagement;
private DistributionSetTypeManagement distributionSetTypeManagement; this.softwareModuleManagement = softwareModuleManagement;
this.softwareModuleTypeManagement = softwareModuleTypeManagement;
@Autowired this.distributionSetManagement = distributionSetManagement;
private TargetManagement targetManagement; this.distributionSetInvalidationManagement = distributionSetInvalidationManagement;
this.distributionSetTypeManagement = distributionSetTypeManagement;
@Autowired this.targetManagement = targetManagement;
private TargetFilterQueryManagement targetFilterQueryManagement; this.targetFilterQueryManagement = targetFilterQueryManagement;
this.targetTypeManagement = targetTypeManagement;
@Autowired this.targetTagManagement = targetTagManagement;
private TargetTypeManagement targetTypeManagement; this.deploymentManagement = deploymentManagement;
this.distributionSetTagManagement = distributionSetTagManagement;
@Autowired this.entityFactory = entityFactory;
private DeploymentManagement deploymentManagement; this.artifactManagement = artifactManagement;
this.rolloutManagement = rolloutManagement;
@Autowired this.rolloutHandler = rolloutHandler;
private TargetTagManagement targetTagManagement; this.quotaManagement = quotaManagement;
}
@Autowired
private DistributionSetTagManagement distributionSetTagManagement;
@Autowired
private EntityFactory entityFactory;
@Autowired
private ArtifactManagement artifactManagement;
@Autowired
private RolloutManagement rolloutManagement;
@Autowired
private RolloutHandler rolloutHandler;
@Autowired
private QuotaManagement quotaManagement;
public static String randomString(final int len) { public static String randomString(final int len) {
return RANDOM_STRING_UTILS.next(len, true, false); return RANDOM_STRING_UTILS.next(len, true, false);
@@ -200,12 +197,10 @@ public class TestdataFactory {
public Action performAssignment(final DistributionSet distributionSet) { public Action performAssignment(final DistributionSet distributionSet) {
final Target target = createTarget(randomString(5)); final Target target = createTarget(randomString(5));
final DeploymentRequest deploymentRequest = new DeploymentRequest(target.getControllerId(), final DeploymentRequest deploymentRequest = new DeploymentRequest(
distributionSet.getId(), ActionType.FORCED, 0, null, null, null, null, false); target.getControllerId(), distributionSet.getId(), ActionType.FORCED, 0, null, null, null, null, false);
deploymentManagement.assignDistributionSets(Collections.singletonList(deploymentRequest)); deploymentManagement.assignDistributionSets(Collections.singletonList(deploymentRequest));
return deploymentManagement.findActionsByTarget(target.getControllerId(), Pageable.unpaged()).getContent().get(0);
return deploymentManagement.findActionsByTarget(target.getControllerId(), Pageable.unpaged()).getContent()
.get(0);
} }
/** /**
@@ -214,8 +209,7 @@ public class TestdataFactory {
* {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
* {@link DistributionSet#isRequiredMigrationStep()} <code>false</code>. * {@link DistributionSet#isRequiredMigrationStep()} <code>false</code>.
* *
* @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, * @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, vendor and description.
* vendor and description.
* @return {@link DistributionSet} entity. * @return {@link DistributionSet} entity.
*/ */
public DistributionSet createDistributionSet(final String prefix) { public DistributionSet createDistributionSet(final String prefix) {
@@ -254,8 +248,7 @@ public class TestdataFactory {
* {@link DistributionSet#isRequiredMigrationStep()} <code>false</code>. * {@link DistributionSet#isRequiredMigrationStep()} <code>false</code>.
* *
* @param modules of {@link DistributionSet#getModules()} * @param modules of {@link DistributionSet#getModules()}
* @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, * @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, vendor and description.
* vendor and description.
* @return {@link DistributionSet} entity. * @return {@link DistributionSet} entity.
*/ */
public DistributionSet createDistributionSet(final Collection<SoftwareModule> modules, final String prefix) { public DistributionSet createDistributionSet(final Collection<SoftwareModule> modules, final String prefix) {
@@ -267,8 +260,7 @@ public class TestdataFactory {
* {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} , * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
* {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION}. * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION}.
* *
* @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, * @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, vendor and description.
* vendor and description.
* @param isRequiredMigrationStep for {@link DistributionSet#isRequiredMigrationStep()} * @param isRequiredMigrationStep for {@link DistributionSet#isRequiredMigrationStep()}
* @return {@link DistributionSet} entity. * @return {@link DistributionSet} entity.
*/ */
@@ -282,8 +274,7 @@ public class TestdataFactory {
* {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
* {@link DistributionSet#isRequiredMigrationStep()} <code>false</code>. * {@link DistributionSet#isRequiredMigrationStep()} <code>false</code>.
* *
* @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, * @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, vendor and description.
* vendor and description.
* @param tags DistributionSet tags * @param tags DistributionSet tags
* @return {@link DistributionSet} entity. * @return {@link DistributionSet} entity.
*/ */
@@ -292,14 +283,11 @@ public class TestdataFactory {
} }
/** /**
* Creates {@link DistributionSet} in repository including three * Creates {@link DistributionSet} in repository including three {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
* {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
* {@link #SM_TYPE_APP}. * {@link #SM_TYPE_APP}.
* *
* @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, * @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, vendor and description.
* vendor and description. * @param version {@link DistributionSet#getVersion()} and {@link SoftwareModule#getVersion()} extended by a random number.
* @param version {@link DistributionSet#getVersion()} and
* {@link SoftwareModule#getVersion()} extended by a random number.
* @param isRequiredMigrationStep for {@link DistributionSet#isRequiredMigrationStep()} * @param isRequiredMigrationStep for {@link DistributionSet#isRequiredMigrationStep()}
* @return {@link DistributionSet} entity. * @return {@link DistributionSet} entity.
*/ */
@@ -352,9 +340,8 @@ public class TestdataFactory {
* @param modules for {@link DistributionSet#getModules()} * @param modules for {@link DistributionSet#getModules()}
* @return {@link DistributionSet} entity. * @return {@link DistributionSet} entity.
*/ */
public DistributionSet createDistributionSet(final String prefix, final String version, public DistributionSet createDistributionSet(
final boolean isRequiredMigrationStep, final Collection<SoftwareModule> modules) { final String prefix, final String version, final boolean isRequiredMigrationStep, final Collection<SoftwareModule> modules) {
return distributionSetManagement.create( return distributionSetManagement.create(
entityFactory.distributionSet().create().name(prefix != null && !prefix.isEmpty() ? prefix : "DS") entityFactory.distributionSet().create().name(prefix != null && !prefix.isEmpty() ? prefix : "DS")
.version(version).description(randomDescriptionShort()).type(findOrCreateDefaultTestDsType()) .version(version).description(randomDescriptionShort()).type(findOrCreateDefaultTestDsType())
@@ -363,15 +350,11 @@ public class TestdataFactory {
} }
/** /**
* Creates {@link DistributionSet} in repository including three * Creates {@link DistributionSet} in repository including three {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
* {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
* {@link #SM_TYPE_APP}. * {@link #SM_TYPE_APP}.
* *
* @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, * @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, vendor and description.
* vendor and description. * @param version {@link DistributionSet#getVersion()} and {@link SoftwareModule#getVersion()} extended by a random number.updat
* @param version {@link DistributionSet#getVersion()} and
* {@link SoftwareModule#getVersion()} extended by a random
* number.updat
* @param tags DistributionSet tags * @param tags DistributionSet tags
* @return {@link DistributionSet} entity. * @return {@link DistributionSet} entity.
*/ */
@@ -382,17 +365,14 @@ public class TestdataFactory {
} }
/** /**
* Creates {@link DistributionSet}s in repository including three * Creates {@link DistributionSet}s in repository including three {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
* {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} , * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an iterative number and {@link DistributionSet#isRequiredMigrationStep()}
* {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an iterative
* number and {@link DistributionSet#isRequiredMigrationStep()}
* <code>false</code>. * <code>false</code>.
* *
* @param number of {@link DistributionSet}s to create * @param number of {@link DistributionSet}s to create
* @return {@link List} of {@link DistributionSet} entities * @return {@link List} of {@link DistributionSet} entities
*/ */
public List<DistributionSet> createDistributionSets(final int number) { public List<DistributionSet> createDistributionSets(final int number) {
return createDistributionSets("", number); return createDistributionSets("", number);
} }
@@ -403,57 +383,53 @@ public class TestdataFactory {
* @return {@link List} of {@link DistributionSet} entities * @return {@link List} of {@link DistributionSet} entities
*/ */
public List<DistributionSet> createDistributionSetsWithoutModules(final int number) { public List<DistributionSet> createDistributionSetsWithoutModules(final int number) {
final List<DistributionSet> sets = new ArrayList<>(number); final List<DistributionSet> sets = new ArrayList<>(number);
for (int i = 0; i < number; i++) { for (int i = 0; i < number; i++) {
sets.add(distributionSetManagement sets.add(distributionSetManagement
.create(entityFactory.distributionSet().create().name("DS" + i).version(DEFAULT_VERSION + "." + i) .create(entityFactory.distributionSet().create()
.description(randomDescriptionShort()).type(findOrCreateDefaultTestDsType()))); .name("DS" + i)
.version(DEFAULT_VERSION + "." + i)
.description(randomDescriptionShort())
.type(findOrCreateDefaultTestDsType())));
} }
return sets; return sets;
} }
/** /**
* Creates {@link DistributionSet}s in repository including three * Creates {@link DistributionSet}s in repository including three {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
* {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} , * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an iterative number and {@link DistributionSet#isRequiredMigrationStep()}
* {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an iterative
* number and {@link DistributionSet#isRequiredMigrationStep()}
* <code>false</code>. * <code>false</code>.
* *
* @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, * @param prefix for {@link SoftwareModule}s and {@link DistributionSet}s name, vendor and description.
* vendor and description.
* @param number of {@link DistributionSet}s to create * @param number of {@link DistributionSet}s to create
* @return {@link List} of {@link DistributionSet} entities * @return {@link List} of {@link DistributionSet} entities
*/ */
public List<DistributionSet> createDistributionSets(final String prefix, final int number) { public List<DistributionSet> createDistributionSets(final String prefix, final int number) {
final List<DistributionSet> sets = new ArrayList<>(); final List<DistributionSet> sets = new ArrayList<>();
for (int i = 0; i < number; i++) { for (int i = 0; i < number; i++) {
sets.add(createDistributionSet(prefix, DEFAULT_VERSION + "." + i, false)); sets.add(createDistributionSet(prefix, DEFAULT_VERSION + "." + i, false));
} }
return sets; return sets;
} }
/** /**
* Creates {@link DistributionSet}s in repository with * Creates {@link DistributionSet}s in repository with {@link #DEFAULT_DESCRIPTION} and {@link DistributionSet#isRequiredMigrationStep()}
* {@link #DEFAULT_DESCRIPTION} and * <code>false</code>.
* {@link DistributionSet#isRequiredMigrationStep()} <code>false</code>.
* *
* @param name {@link DistributionSet#getName()} * @param name {@link DistributionSet#getName()}
* @param version {@link DistributionSet#getVersion()} * @param version {@link DistributionSet#getVersion()}
* @return {@link DistributionSet} entity * @return {@link DistributionSet} entity
*/ */
public DistributionSet createDistributionSetWithNoSoftwareModules(final String name, final String version) { public DistributionSet createDistributionSetWithNoSoftwareModules(final String name, final String version) {
return distributionSetManagement.create(entityFactory.distributionSet().create()
return distributionSetManagement.create(entityFactory.distributionSet().create().name(name).version(version) .name(name)
.description(DEFAULT_DESCRIPTION).type(findOrCreateDefaultTestDsType())); .version(version)
.description(DEFAULT_DESCRIPTION)
.type(findOrCreateDefaultTestDsType()));
} }
/** /**
* Creates {@link Artifact}s for given {@link SoftwareModule} with a small text * Creates {@link Artifact}s for given {@link SoftwareModule} with a small text payload.
* payload.
* *
* @param moduleId the {@link Artifact}s belong to. * @param moduleId the {@link Artifact}s belong to.
* @return {@link Artifact} entity. * @return {@link Artifact} entity.
@@ -464,45 +440,39 @@ public class TestdataFactory {
final String artifactData = "some test data" + i; final String artifactData = "some test data" + i;
artifacts.add(createArtifact(artifactData, moduleId, "filename" + i)); artifacts.add(createArtifact(artifactData, moduleId, "filename" + i));
} }
return artifacts; return artifacts;
} }
/** /**
* Create an {@link Artifact} for given {@link SoftwareModule} with a small text * Create an {@link Artifact} for given {@link SoftwareModule} with a small text payload.
* payload.
* *
* @param artifactData the {@link Artifact} Inputstream * @param artifactData the {@link Artifact} InputStream
* @param moduleId the {@link Artifact} belongs to * @param moduleId the {@link Artifact} belongs to
* @param filename that was provided during upload. * @param filename that was provided during upload.
* @return {@link Artifact} entity. * @return {@link Artifact} entity.
*/ */
public Artifact createArtifact(final String artifactData, final Long moduleId, final String filename) { public Artifact createArtifact(final String artifactData, final Long moduleId, final String filename) {
final InputStream stubInputStream = IOUtils.toInputStream(artifactData, StandardCharsets.UTF_8); final InputStream stubInputStream = IOUtils.toInputStream(artifactData, StandardCharsets.UTF_8);
return artifactManagement return artifactManagement.create(new ArtifactUpload(stubInputStream, moduleId, filename, false, artifactData.length()));
.create(new ArtifactUpload(stubInputStream, moduleId, filename, false, artifactData.length()));
} }
/** /**
* Create an {@link Artifact} for given {@link SoftwareModule} with a small text * Create an {@link Artifact} for given {@link SoftwareModule} with a small text payload.
* payload.
* *
* @param artifactData the {@link Artifact} Inputstream * @param artifactData the {@link Artifact} InputStream
* @param moduleId the {@link Artifact} belongs to * @param moduleId the {@link Artifact} belongs to
* @param filename that was provided during upload. * @param filename that was provided during upload.
* @param fileSize the file size * @param fileSize the file size
* @return {@link Artifact} entity. * @return {@link Artifact} entity.
*/ */
public Artifact createArtifact(final byte[] artifactData, final Long moduleId, final String filename, public Artifact createArtifact(final byte[] artifactData, final Long moduleId, final String filename, final int fileSize) {
final int fileSize) {
return artifactManagement.create( return artifactManagement.create(
new ArtifactUpload(new ByteArrayInputStream(artifactData), moduleId, filename, false, fileSize)); new ArtifactUpload(new ByteArrayInputStream(artifactData), moduleId, filename, false, fileSize));
} }
/** /**
* Creates {@link SoftwareModule} with {@link #DEFAULT_VENDOR} and * Creates {@link SoftwareModule} with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION} and random generated
* {@link #DEFAULT_VERSION} and random generated {@link Target#getDescription()} * {@link Target#getDescription()} in the repository.
* in the repository.
* *
* @param typeKey of the {@link SoftwareModuleType} * @param typeKey of the {@link SoftwareModuleType}
* @return persisted {@link SoftwareModule}. * @return persisted {@link SoftwareModule}.
@@ -512,9 +482,8 @@ public class TestdataFactory {
} }
/** /**
* Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_APP_KEY} * Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_APP_KEY} with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION}
* with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION} and random * and random generated {@link Target#getDescription()} in the repository.
* generated {@link Target#getDescription()} in the repository.
* *
* @return persisted {@link SoftwareModule}. * @return persisted {@link SoftwareModule}.
*/ */
@@ -523,9 +492,8 @@ public class TestdataFactory {
} }
/** /**
* Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_APP_KEY} * Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_APP_KEY} with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION}
* with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION} and random * and random generated {@link Target#getDescription()} in the repository.
* generated {@link Target#getDescription()} in the repository.
* *
* @param prefix added to name and version * @param prefix added to name and version
* @return persisted {@link SoftwareModule}. * @return persisted {@link SoftwareModule}.
@@ -535,9 +503,8 @@ public class TestdataFactory {
} }
/** /**
* Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_OS_KEY} * Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_OS_KEY} with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION}
* with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION} and random * and random generated {@link Target#getDescription()} in the repository.
* generated {@link Target#getDescription()} in the repository.
* *
* @return persisted {@link SoftwareModule}. * @return persisted {@link SoftwareModule}.
*/ */
@@ -546,9 +513,8 @@ public class TestdataFactory {
} }
/** /**
* Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_OS_KEY} * Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_OS_KEY} with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION}
* with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION} and random * and random generated {@link Target#getDescription()} in the repository.
* generated {@link Target#getDescription()} in the repository.
* *
* @param prefix added to name and version * @param prefix added to name and version
* @return persisted {@link SoftwareModule}. * @return persisted {@link SoftwareModule}.
@@ -558,9 +524,8 @@ public class TestdataFactory {
} }
/** /**
* Creates {@link SoftwareModule} with {@link #DEFAULT_VENDOR} and * Creates {@link SoftwareModule} with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION} and random generated
* {@link #DEFAULT_VERSION} and random generated {@link Target#getDescription()} * {@link Target#getDescription()} in the repository.
* in the repository.
* *
* @param typeKey of the {@link SoftwareModuleType} * @param typeKey of the {@link SoftwareModuleType}
* @param prefix added to name and version * @param prefix added to name and version
@@ -568,8 +533,12 @@ public class TestdataFactory {
*/ */
public SoftwareModule createSoftwareModule(final String typeKey, final String prefix, final boolean encrypted) { public SoftwareModule createSoftwareModule(final String typeKey, final String prefix, final boolean encrypted) {
return softwareModuleManagement.create(entityFactory.softwareModule().create() return softwareModuleManagement.create(entityFactory.softwareModule().create()
.type(findOrCreateSoftwareModuleType(typeKey)).name(prefix + typeKey).version(prefix + DEFAULT_VERSION) .type(findOrCreateSoftwareModuleType(typeKey))
.description(randomDescriptionShort()).vendor(DEFAULT_VENDOR).encrypted(encrypted)); .name(prefix + typeKey)
.version(prefix + DEFAULT_VERSION)
.description(randomDescriptionShort())
.vendor(DEFAULT_VENDOR)
.encrypted(encrypted));
} }
/** /**
@@ -593,15 +562,14 @@ public class TestdataFactory {
* @return persisted {@link Target} * @return persisted {@link Target}
*/ */
public Target createTarget(final String controllerId, final String targetName) { public Target createTarget(final String controllerId, final String targetName) {
final Target target = targetManagement final Target target = targetManagement.create(entityFactory.target().create().controllerId(controllerId).name(targetName));
.create(entityFactory.target().create().controllerId(controllerId).name(targetName));
assertTargetProperlyCreated(target); assertTargetProperlyCreated(target);
return target; return target;
} }
public Target createTarget(final String controllerId, final String targetName, final String address) { public Target createTarget(final String controllerId, final String targetName, final String address) {
final Target target = targetManagement final Target target = targetManagement.create(
.create(entityFactory.target().create().controllerId(controllerId).name(targetName).address(address)); entityFactory.target().create().controllerId(controllerId).name(targetName).address(address));
assertTargetProperlyCreated(target); assertTargetProperlyCreated(target);
return target; return target;
} }
@@ -620,15 +588,12 @@ public class TestdataFactory {
} }
/** /**
* Creates {@link DistributionSet}s in repository including three * Creates {@link DistributionSet}s in repository including three {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
* {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} , * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an iterative number and {@link DistributionSet#isRequiredMigrationStep()}
* {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an iterative
* number and {@link DistributionSet#isRequiredMigrationStep()}
* <code>false</code>. * <code>false</code>.
* *
* In addition it updates the created {@link DistributionSet}s and * In addition, it updates the created {@link DistributionSet}s and {@link SoftwareModule}s to ensure that
* {@link SoftwareModule}s to ensure that {@link BaseEntity#getLastModifiedAt()} * {@link BaseEntity#getLastModifiedAt()} and {@link BaseEntity#getLastModifiedBy()} is filled.
* and {@link BaseEntity#getLastModifiedBy()} is filled.
* *
* @return persisted {@link DistributionSet}. * @return persisted {@link DistributionSet}.
*/ */
@@ -645,9 +610,8 @@ public class TestdataFactory {
} }
/** /**
* @return {@link DistributionSetType} with key {@link #DS_TYPE_DEFAULT} and * @return {@link DistributionSetType} with key {@link #DS_TYPE_DEFAULT} and {@link SoftwareModuleType}s {@link #SM_TYPE_OS},
* {@link SoftwareModuleType}s {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} * {@link #SM_TYPE_RT} , {@link #SM_TYPE_APP}.
* , {@link #SM_TYPE_APP}.
*/ */
public DistributionSetType findOrCreateDefaultTestDsType() { public DistributionSetType findOrCreateDefaultTestDsType() {
final List<SoftwareModuleType> mand = new ArrayList<>(); final List<SoftwareModuleType> mand = new ArrayList<>();
@@ -1316,7 +1280,7 @@ public class TestdataFactory {
private Action sendUpdateActionStatusToTarget(final Status status, final Action updActA, private Action sendUpdateActionStatusToTarget(final Status status, final Action updActA,
final Collection<String> msgs) { final Collection<String> msgs) {
return controllerManagament.addUpdateActionStatus( return controllerManagement.addUpdateActionStatus(
entityFactory.actionStatus().create(updActA.getId()).status(status).messages(msgs)); entityFactory.actionStatus().create(updActA.getId()).status(status).messages(msgs));
} }