Add POST REST method for assigning tag to multiple DS (#2280)

!!! the PUT method is deprecated for removal

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-02-13 14:49:55 +02:00
committed by GitHub
parent 99bb88ce55
commit 059fd26fae
3 changed files with 24 additions and 5 deletions

View File

@@ -344,10 +344,9 @@ class MgmtDistributionSetTagResourceTest extends AbstractManagementApiIntegratio
final DistributionSetTag tag = testdataFactory.createDistributionSetTags(1).get(0);
final List<DistributionSet> sets = testdataFactory.createDistributionSetsWithoutModules(2);
mvc.perform(
put(MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
.content(JsonBuilder.toArray(sets.stream().map(DistributionSet::getId).toList()))
.contentType(MediaType.APPLICATION_JSON))
mvc.perform(post(MgmtRestConstants.DISTRIBUTIONSET_TAG_V1_REQUEST_MAPPING + "/" + tag.getId() + "/assigned")
.content(JsonBuilder.toArray(sets.stream().map(DistributionSet::getId).toList()))
.contentType(MediaType.APPLICATION_JSON))
.andDo(MockMvcResultPrinter.print())
.andExpect(status().isOk());