Multi-Asssignments feature removal (#2893)
* Multi-Asssignments feature removal Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * fix some sonar findings Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * fixes after review Signed-off-by: strailov <Stanislav.Trailov@bosch.io> --------- Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
This commit is contained in:
committed by
GitHub
parent
2bf443661d
commit
c33156b134
@@ -687,23 +687,6 @@ class DdiRootControllerTest extends AbstractDDiApiIntegrationTest {
|
||||
.andExpect(jsonPath("$.deployment.maintenanceWindow", equalTo("available")));
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign multiple DS in multi-assignment mode. The earliest active Action is exposed to the controller.
|
||||
*/
|
||||
@Test
|
||||
void earliestActionIsExposedToControllerInMultiAssignMode() throws Exception {
|
||||
enableMultiAssignments();
|
||||
final Target target = testdataFactory.createTarget();
|
||||
final DistributionSet ds1 = testdataFactory.createDistributionSet(UUID.randomUUID().toString());
|
||||
final DistributionSet ds2 = testdataFactory.createDistributionSet(UUID.randomUUID().toString());
|
||||
final Action action1 = getFirstAssignedAction(assignDistributionSet(ds1.getId(), target.getControllerId(), 56));
|
||||
final Long action2Id = getFirstAssignedActionId(assignDistributionSet(ds2.getId(), target.getControllerId(), 34));
|
||||
|
||||
assertDeploymentActionIsExposedToTarget(target.getControllerId(), action1.getId());
|
||||
sendDeploymentActionFeedback(target, action1, "closed", "success");
|
||||
assertDeploymentActionIsExposedToTarget(target.getControllerId(), action2Id);
|
||||
}
|
||||
|
||||
/**
|
||||
* The system should not create a new target because of a too long controller id.
|
||||
*/
|
||||
@@ -759,16 +742,6 @@ class DdiRootControllerTest extends AbstractDDiApiIntegrationTest {
|
||||
return sendDeploymentActionFeedback(target, action, execution, finished, null);
|
||||
}
|
||||
|
||||
private void assertDeploymentActionIsExposedToTarget(final String controllerId, final long expectedActionId) throws Exception {
|
||||
final String expectedDeploymentBaseLink = String.format(
|
||||
"/%s/controller/v1/%s/deploymentBase/%d",
|
||||
AccessContext.tenant(), controllerId, expectedActionId);
|
||||
mvc.perform(get(CONTROLLER_BASE, AccessContext.tenant(), controllerId).accept(MediaType.APPLICATION_JSON))
|
||||
.andDo(MockMvcResultPrinter.print())
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$._links.deploymentBase.href", containsString(expectedDeploymentBaseLink)));
|
||||
}
|
||||
|
||||
private void withPollingTime(final String pollingTime, final Callable<Void> runnable) throws Exception {
|
||||
getAs(withUser("tenantadmin", TENANT_CONFIGURATION),
|
||||
() -> {
|
||||
|
||||
Reference in New Issue
Block a user