Set offline DS action inactive on creation (#728)
* fix: set offline DS action inactive on creation * test: assert that all offline actions are inactive Signed-off-by: Subhadip Pramanik <pramaniksubhadip@gmail.com>
This commit is contained in:
committed by
Jeroen Laverman
parent
086c5ca0cf
commit
9bec200a7a
@@ -484,7 +484,8 @@ public class DeploymentManagementTest extends AbstractJpaIntegrationTest {
|
||||
final List<Target> targets = deploymentManagement.offlineAssignedDistributionSet(ds.getId(), controllerIds)
|
||||
.getAssignedEntity();
|
||||
assertThat(actionRepository.count()).isEqualTo(20);
|
||||
|
||||
assertThat(actionRepository.findByDistributionSetId(PAGE, ds.getId()))
|
||||
.as("Offline actions are not active").allMatch(action -> !action.isActive());
|
||||
assertThat(targetManagement.findByInstalledDistributionSet(PAGE, ds.getId()).getContent()).containsAll(targets)
|
||||
.hasSize(10).containsAll(targetManagement.findByAssignedDistributionSet(PAGE, ds.getId()))
|
||||
.as("InstallationDate set").allMatch(target -> target.getInstallationDate() >= current)
|
||||
|
||||
Reference in New Issue
Block a user