Fix DS Type update to do not remove mandatory/optional module types (#2598)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -811,11 +811,13 @@ class MgmtDistributionSetTypeResourceTest extends AbstractManagementApiIntegrati
|
||||
.build(),
|
||||
DistributionSetTypeManagement.Create.builder()
|
||||
.key("testKey2").name("TestName2").description("Desc2").colour("col")
|
||||
.mandatoryModuleTypes(Set.of())
|
||||
.optionalModuleTypes(Set.of(runtimeType, osType, appType))
|
||||
.build(),
|
||||
DistributionSetTypeManagement.Create.builder()
|
||||
.key("testKey3").name("TestName3").description("Desc3").colour("col")
|
||||
.mandatoryModuleTypes(Set.of(runtimeType, osType))
|
||||
.optionalModuleTypes(Set.of())
|
||||
.build());
|
||||
}
|
||||
|
||||
|
||||
@@ -3015,15 +3015,12 @@ class MgmtTargetResourceTest extends AbstractManagementApiIntegrationTest {
|
||||
assertThat(targetManagement.isControllerAttributesRequested(knownTargetId)).isTrue();
|
||||
}
|
||||
|
||||
private String getCreateTargetsListJsonString(final String controllerId, final String name,
|
||||
final String description) {
|
||||
return "[{\"name\":\"" + name + "\",\"controllerId\":\"" + controllerId + "\",\"description\":\"" + description
|
||||
+ "\"}]";
|
||||
private String getCreateTargetsListJsonString(final String controllerId, final String name, final String description) {
|
||||
return "[{\"name\":\"" + name + "\",\"controllerId\":\"" + controllerId + "\",\"description\":\"" + description + "\"}]";
|
||||
}
|
||||
|
||||
private Target createSingleTarget(final String controllerId, final String name) {
|
||||
targetManagement.create(entityFactory.target().create().controllerId(controllerId).name(name)
|
||||
.description(TARGET_DESCRIPTION_TEST));
|
||||
targetManagement.create(entityFactory.target().create().controllerId(controllerId).name(name).description(TARGET_DESCRIPTION_TEST));
|
||||
return controllerManagement.findOrRegisterTargetIfItDoesNotExist(controllerId, LOCALHOST);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user