Added documentation test changes as well
Signed-off-by: Shruthi Manavalli Ramanna <shruthimanavalli.ramanna@bosch-si.com>
This commit is contained in:
@@ -169,7 +169,7 @@ public final class MgmtSoftwareModuleMapper {
|
||||
systemManagement.getTenantMetadata().getId(), null, null,
|
||||
new URLPlaceholder.SoftwareData(artifact.getSoftwareModule().getId(), artifact.getFilename(),
|
||||
artifact.getId(), artifact.getSha1Hash())), ApiType.MGMT, null);
|
||||
response.add(Link.of(urls.get(0).getRef()).withRel("cdn-download").expand());
|
||||
response.add(Link.of(urls.get(0).getRef()).withRel("download").expand());
|
||||
}
|
||||
|
||||
static List<MgmtArtifact> artifactsToResponse(final Collection<Artifact> artifacts) {
|
||||
|
||||
@@ -616,7 +616,7 @@ class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegrationTes
|
||||
.andExpect(jsonPath("$.hashes.sha1", equalTo(artifact.getSha1Hash())))
|
||||
.andExpect(jsonPath("$.hashes.sha256", equalTo(artifact.getSha256Hash())))
|
||||
.andExpect(jsonPath("$.providedFilename", equalTo("file1")))
|
||||
.andExpect(jsonPath("$._links.cdn-download.href",
|
||||
.andExpect(jsonPath("$._links.download.href",
|
||||
equalTo("http://localhost:8080/rest/v1/softwaremodules/" + sm.getId() + "/artifacts/"
|
||||
+ artifact.getFilename())))
|
||||
.andExpect(jsonPath("$._links.self.href", equalTo(
|
||||
|
||||
Reference in New Issue
Block a user