Configurable download URL generation (#296)
Configurable download URL generation. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -279,23 +279,23 @@ public class ArtifactManagementTest extends AbstractJpaIntegrationTestWithMongoD
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.eclipse.hawkbit.repository.ArtifactManagement#findArtifact(java.lang.Long)}
|
||||
* {@link org.eclipse.hawkbit.repository.ArtifactManagement#findLocalArtifact(java.lang.Long)}
|
||||
* .
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws NoSuchAlgorithmException
|
||||
*/
|
||||
@Test
|
||||
@Description("Loads an artifact based on given ID.")
|
||||
public void findArtifact() throws NoSuchAlgorithmException, IOException {
|
||||
@Description("Loads an local artifact based on given ID.")
|
||||
public void findLocalArtifact() throws NoSuchAlgorithmException, IOException {
|
||||
SoftwareModule sm = new JpaSoftwareModule(softwareManagement.findSoftwareModuleTypeByKey("os"), "name 1",
|
||||
"version 1", null, null);
|
||||
sm = softwareManagement.createSoftwareModule(sm);
|
||||
|
||||
final Artifact result = artifactManagement.createLocalArtifact(new RandomGeneratedInputStream(5 * 1024),
|
||||
final LocalArtifact result = artifactManagement.createLocalArtifact(new RandomGeneratedInputStream(5 * 1024),
|
||||
sm.getId(), "file1", false);
|
||||
|
||||
assertThat(artifactManagement.findArtifact(result.getId())).isEqualTo(result);
|
||||
assertThat(artifactManagement.findLocalArtifact(result.getId())).isEqualTo(result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -937,7 +937,7 @@ public class DeploymentManagementTest extends AbstractJpaIntegrationTest {
|
||||
for (final Target myt : targets) {
|
||||
boolean found = false;
|
||||
for (final TargetAssignDistributionSetEvent event : events) {
|
||||
if (event.getControllerId().equals(myt.getControllerId())) {
|
||||
if (event.getTarget().getControllerId().equals(myt.getControllerId())) {
|
||||
found = true;
|
||||
final List<Action> activeActionsByTarget = deploymentManagement.findActiveActionsByTarget(myt);
|
||||
assertThat(activeActionsByTarget).as("size of active actions for target is wrong").isNotEmpty();
|
||||
|
||||
Reference in New Issue
Block a user