Move DDI resources and annotation to module hawkbit-ddi-resource
- added missing pathVaraible - added port to download urls and adjusted tests - extended feign management API client - fixed pom test artifacts dependencies Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRequestBodyPost;
|
import org.eclipse.hawkbit.rest.resource.model.distributionset.DistributionSetRequestBodyPost;
|
||||||
|
import org.eclipse.hawkbit.rest.resource.model.softwaremodule.SoftwareModuleAssigmentRest;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
@@ -23,6 +24,7 @@ public class DistributionSetBuilder {
|
|||||||
private String name;
|
private String name;
|
||||||
private String version;
|
private String version;
|
||||||
private String type;
|
private String type;
|
||||||
|
private final List<SoftwareModuleAssigmentRest> modules = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param name
|
* @param name
|
||||||
@@ -34,6 +36,13 @@ public class DistributionSetBuilder {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DistributionSetBuilder moduleByID(final Long id) {
|
||||||
|
final SoftwareModuleAssigmentRest softwareModuleAssigmentRest = new SoftwareModuleAssigmentRest();
|
||||||
|
softwareModuleAssigmentRest.setId(id);
|
||||||
|
modules.add(softwareModuleAssigmentRest);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param version
|
* @param version
|
||||||
* the version of the distribution set
|
* the version of the distribution set
|
||||||
@@ -89,6 +98,7 @@ public class DistributionSetBuilder {
|
|||||||
body.setName(prefixName);
|
body.setName(prefixName);
|
||||||
body.setVersion(version);
|
body.setVersion(version);
|
||||||
body.setType(type);
|
body.setType(type);
|
||||||
|
body.setModules(modules);
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||||||
@ConfigurationProperties("hawkbit.artifact.url")
|
@ConfigurationProperties("hawkbit.artifact.url")
|
||||||
public class ArtifactUrlHandlerProperties {
|
public class ArtifactUrlHandlerProperties {
|
||||||
private static final String DEFAULT_IP_LOCALHOST = "127.0.0.1";
|
private static final String DEFAULT_IP_LOCALHOST = "127.0.0.1";
|
||||||
private static final String LOCALHOST = "localhost";
|
private static final String LOCALHOST = "localhost:8080";
|
||||||
|
|
||||||
private final Http http = new Http();
|
private final Http http = new Http();
|
||||||
private final Https https = new Https();
|
private final Https https = new Https();
|
||||||
|
|||||||
@@ -26,11 +26,6 @@
|
|||||||
<artifactId>hawkbit-repository</artifactId>
|
<artifactId>hawkbit-repository</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency>
|
|
||||||
<groupId>org.eclipse.hawkbit</groupId>
|
|
||||||
<artifactId>hawkbit-core</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency> -->
|
|
||||||
|
|
||||||
<!-- Test -->
|
<!-- Test -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -32,16 +32,16 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.web.bind.annotation.AuthenticationPrincipal;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link ArtifactStoreController} of the Rollouts server controller API
|
* The {@link ArtifactStoreController} of the HawkBit server controller API that
|
||||||
* that is queried by the SP target in order to download artifacts independent
|
* is queried by the HawkBit target in order to download artifacts independent
|
||||||
* of their own individual resource. This is offered in addition to the
|
* of their own individual resource. This is offered in addition to the
|
||||||
* {@link RootController#downloadArtifact(String, Long, Long, javax.servlet.http.HttpServletResponse)}
|
* {@link RootController#downloadArtifact(String, Long, Long, javax.servlet.http.HttpServletResponse)}
|
||||||
* for legacy controllers that can not be fed with a download URI at runtime.
|
* for legacy controllers that can not be fed with a download URI at runtime.
|
||||||
*
|
|
||||||
* TODO
|
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
public class ArtifactStoreController implements ArtifactStoreControllerDdiApi {
|
public class ArtifactStoreController implements ArtifactStoreControllerDdiApi {
|
||||||
@@ -61,8 +61,9 @@ public class ArtifactStoreController implements ArtifactStoreControllerDdiApi {
|
|||||||
private HawkbitSecurityProperties securityProperties;
|
private HawkbitSecurityProperties securityProperties;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResponseEntity<Void> downloadArtifactByFilename(final String fileName, final HttpServletResponse response,
|
public ResponseEntity<Void> downloadArtifactByFilename(@PathVariable("fileName") final String fileName,
|
||||||
final HttpServletRequest request, final String targetid) {
|
final HttpServletResponse response, final HttpServletRequest request,
|
||||||
|
@AuthenticationPrincipal final String targetid) {
|
||||||
ResponseEntity<Void> result;
|
ResponseEntity<Void> result;
|
||||||
|
|
||||||
final List<LocalArtifact> foundArtifacts = artifactManagement.findLocalArtifactByFilename(fileName);
|
final List<LocalArtifact> foundArtifacts = artifactManagement.findLocalArtifactByFilename(fileName);
|
||||||
@@ -99,7 +100,7 @@ public class ArtifactStoreController implements ArtifactStoreControllerDdiApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResponseEntity<Void> downloadArtifactMD5ByFilename(final String fileName,
|
public ResponseEntity<Void> downloadArtifactMD5ByFilename(@PathVariable("fileName") final String fileName,
|
||||||
final HttpServletResponse response) {
|
final HttpServletResponse response) {
|
||||||
final List<LocalArtifact> foundArtifacts = artifactManagement.findLocalArtifactByFilename(fileName);
|
final List<LocalArtifact> foundArtifacts = artifactManagement.findLocalArtifactByFilename(fileName);
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import org.springframework.hateoas.Link;
|
|||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility class for the Controller API.
|
* Utility class for the DDI API.
|
||||||
*/
|
*/
|
||||||
public final class DataConversionHelper {
|
public final class DataConversionHelper {
|
||||||
|
|
||||||
|
|||||||
@@ -56,13 +56,11 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link RootController} of the hawkBit server controller API that is
|
* The {@link RootController} of the hawkBit server DDI API that is queried by
|
||||||
* queried by the hawkBit controller in order to pull {@link Action}s that have
|
* the hawkBit controller in order to pull {@link Action}s that have to be
|
||||||
* to be fulfilled and report status updates concerning the {@link Action}
|
* fulfilled and report status updates concerning the {@link Action} processing.
|
||||||
* processing.
|
|
||||||
*
|
*
|
||||||
* Transactional (read-write) as all queries at least update the last poll time.
|
* Transactional (read-write) as all queries at least update the last poll time.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
public class RootController implements RootControllerDdiApi {
|
public class RootController implements RootControllerDdiApi {
|
||||||
|
|||||||
@@ -170,23 +170,23 @@ public class DeploymentBaseTest extends AbstractIntegrationTestWithMongoDB {
|
|||||||
jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0].hashes.sha1",
|
jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0].hashes.sha1",
|
||||||
equalTo(artifact.getSha1Hash())))
|
equalTo(artifact.getSha1Hash())))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.download.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.download.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1")))
|
+ "/artifacts/test1")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.md5sum.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.md5sum.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.MD5SUM")))
|
+ "/artifacts/test1.MD5SUM")))
|
||||||
|
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.download-http.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.download-http.href",
|
||||||
equalTo("http://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("http://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1")))
|
+ "/artifacts/test1")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.md5sum-http.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.md5sum-http.href",
|
||||||
equalTo("http://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("http://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.MD5SUM")))
|
+ "/artifacts/test1.MD5SUM")))
|
||||||
@@ -200,22 +200,22 @@ public class DeploymentBaseTest extends AbstractIntegrationTestWithMongoDB {
|
|||||||
jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1].hashes.sha1",
|
jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1].hashes.sha1",
|
||||||
equalTo(artifactSignature.getSha1Hash())))
|
equalTo(artifactSignature.getSha1Hash())))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature")))
|
+ "/artifacts/test1.signature")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature.MD5SUM")))
|
+ "/artifacts/test1.signature.MD5SUM")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download-http.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download-http.href",
|
||||||
equalTo("http://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("http://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature")))
|
+ "/artifacts/test1.signature")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum-http.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum-http.href",
|
||||||
equalTo("http://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("http://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature.MD5SUM")))
|
+ "/artifacts/test1.signature.MD5SUM")))
|
||||||
@@ -315,12 +315,12 @@ public class DeploymentBaseTest extends AbstractIntegrationTestWithMongoDB {
|
|||||||
jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0].hashes.sha1",
|
jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0].hashes.sha1",
|
||||||
equalTo(artifact.getSha1Hash())))
|
equalTo(artifact.getSha1Hash())))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.download.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.download.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1")))
|
+ "/artifacts/test1")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.md5sum.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.md5sum.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.MD5SUM")))
|
+ "/artifacts/test1.MD5SUM")))
|
||||||
@@ -333,22 +333,22 @@ public class DeploymentBaseTest extends AbstractIntegrationTestWithMongoDB {
|
|||||||
jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1].hashes.sha1",
|
jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1].hashes.sha1",
|
||||||
equalTo(artifactSignature.getSha1Hash())))
|
equalTo(artifactSignature.getSha1Hash())))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature")))
|
+ "/artifacts/test1.signature")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature.MD5SUM")))
|
+ "/artifacts/test1.signature.MD5SUM")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download-http.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download-http.href",
|
||||||
equalTo("http://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("http://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature")))
|
+ "/artifacts/test1.signature")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum-http.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum-http.href",
|
||||||
equalTo("http://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("http://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature.MD5SUM")))
|
+ "/artifacts/test1.signature.MD5SUM")))
|
||||||
@@ -445,22 +445,22 @@ public class DeploymentBaseTest extends AbstractIntegrationTestWithMongoDB {
|
|||||||
equalTo(artifact.getSha1Hash())))
|
equalTo(artifact.getSha1Hash())))
|
||||||
|
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.download.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.download.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1")))
|
+ "/artifacts/test1")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.md5sum.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.md5sum.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.MD5SUM")))
|
+ "/artifacts/test1.MD5SUM")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.download-http.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.download-http.href",
|
||||||
equalTo("http://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("http://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1")))
|
+ "/artifacts/test1")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.md5sum-http.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[0]._links.md5sum-http.href",
|
||||||
equalTo("http://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("http://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.MD5SUM")))
|
+ "/artifacts/test1.MD5SUM")))
|
||||||
@@ -473,23 +473,23 @@ public class DeploymentBaseTest extends AbstractIntegrationTestWithMongoDB {
|
|||||||
jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1].hashes.sha1",
|
jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1].hashes.sha1",
|
||||||
equalTo(artifactSignature.getSha1Hash())))
|
equalTo(artifactSignature.getSha1Hash())))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature")))
|
+ "/artifacts/test1.signature")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum.href",
|
||||||
equalTo("https://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("https://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature.MD5SUM")))
|
+ "/artifacts/test1.signature.MD5SUM")))
|
||||||
|
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download-http.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.download-http.href",
|
||||||
equalTo("http://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("http://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature")))
|
+ "/artifacts/test1.signature")))
|
||||||
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum-http.href",
|
.andExpect(jsonPath("$deployment.chunks[?(@.part==os)][0].artifacts[1]._links.md5sum-http.href",
|
||||||
equalTo("http://localhost/" + tenantAware.getCurrentTenant()
|
equalTo("http://localhost:8080/" + tenantAware.getCurrentTenant()
|
||||||
+ "/controller/v1/4712/softwaremodules/"
|
+ "/controller/v1/4712/softwaremodules/"
|
||||||
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
+ findDistributionSetByAction.findFirstModuleByType(osType).getId()
|
||||||
+ "/artifacts/test1.signature.MD5SUM")))
|
+ "/artifacts/test1.signature.MD5SUM")))
|
||||||
|
|||||||
Reference in New Issue
Block a user