Introduce useArtifactUrlHandler parameter

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
This commit is contained in:
Sebastian Firsching
2023-06-20 12:42:50 +02:00
parent 41922bfa0c
commit bdcb361ae5
4 changed files with 16 additions and 12 deletions

View File

@@ -604,8 +604,12 @@ class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegrationTes
final Artifact artifact = artifactManagement.create(
new ArtifactUpload(new ByteArrayInputStream(random), sm.getId(), "file1", false, artifactSize));
final MvcResult result = mvc.perform(get("/rest/v1/softwaremodules/{smId}/artifacts/{artId}?downloadurltype=cdn", sm.getId(), artifact.getId()).accept(
MediaType.APPLICATION_JSON))
.andDo(MockMvcResultPrinter.print()).andReturn();
// perform test
mvc.perform(get("/rest/v1/softwaremodules/{smId}/artifacts/{artId}?downloadurltype=cdn", sm.getId(), artifact.getId()).accept(
mvc.perform(get("/rest/v1/softwaremodules/{smId}/artifacts/{artId}?useartifacturlhandler=true", sm.getId(), artifact.getId()).accept(
MediaType.APPLICATION_JSON))
.andDo(MockMvcResultPrinter.print())
.andExpect(status().isOk())