Fixed wring metadata change in RSQL test
This commit is contained in:
@@ -762,7 +762,7 @@ public class DistributionSetManagement {
|
|||||||
if (distributionSetMetadataRepository.exists(metadata.getId())) {
|
if (distributionSetMetadataRepository.exists(metadata.getId())) {
|
||||||
throwMetadataKeyAlreadyExists(metadata.getId().getKey());
|
throwMetadataKeyAlreadyExists(metadata.getId().getKey());
|
||||||
}
|
}
|
||||||
// merge base software module so optLockRevision gets updated and audit
|
// merge base distribution set so optLockRevision gets updated and audit
|
||||||
// log written because
|
// log written because
|
||||||
// modifying metadata is modifying the base distribution set itself for
|
// modifying metadata is modifying the base distribution set itself for
|
||||||
// auditing purposes.
|
// auditing purposes.
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ public class DistributionSet extends NamedVersionedEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<DistributionSetMetadata> getMetadata() {
|
public List<DistributionSetMetadata> getMetadata() {
|
||||||
return metadata;
|
return Collections.unmodifiableList(metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Action> getActions() {
|
public List<Action> getActions() {
|
||||||
@@ -171,10 +171,6 @@ public class DistributionSet extends NamedVersionedEntity {
|
|||||||
return requiredMigrationStep;
|
return requiredMigrationStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param deleted
|
|
||||||
* the deleted to set
|
|
||||||
*/
|
|
||||||
public DistributionSet setDeleted(final boolean deleted) {
|
public DistributionSet setDeleted(final boolean deleted) {
|
||||||
this.deleted = deleted;
|
this.deleted = deleted;
|
||||||
return this;
|
return this;
|
||||||
@@ -185,10 +181,6 @@ public class DistributionSet extends NamedVersionedEntity {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param tags
|
|
||||||
* the tags to set
|
|
||||||
*/
|
|
||||||
public DistributionSet setTags(final Set<DistributionSetTag> tags) {
|
public DistributionSet setTags(final Set<DistributionSetTag> tags) {
|
||||||
this.tags = tags;
|
this.tags = tags;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ public class SoftwareModule extends NamedVersionedEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<SoftwareModuleMetadata> getMetadata() {
|
public List<SoftwareModuleMetadata> getMetadata() {
|
||||||
return metadata;
|
return Collections.unmodifiableList(metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -35,18 +35,18 @@ public class RSQLDistributionSetFieldTest extends AbstractIntegrationTest {
|
|||||||
@Before
|
@Before
|
||||||
public void seuptBeforeTest() {
|
public void seuptBeforeTest() {
|
||||||
|
|
||||||
final DistributionSet ds = TestDataUtil.generateDistributionSet("DS", softwareManagement,
|
DistributionSet ds = TestDataUtil.generateDistributionSet("DS", softwareManagement, distributionSetManagement);
|
||||||
distributionSetManagement);
|
|
||||||
ds.setDescription("DS");
|
ds.setDescription("DS");
|
||||||
ds.getMetadata().add(new DistributionSetMetadata("metaKey", ds, "metaValue"));
|
ds = distributionSetManagement.updateDistributionSet(ds);
|
||||||
distributionSetManagement.updateDistributionSet(ds);
|
distributionSetManagement
|
||||||
|
.createDistributionSetMetadata(new DistributionSetMetadata("metaKey", ds, "metaValue"));
|
||||||
|
|
||||||
final DistributionSet ds2 = TestDataUtil
|
DistributionSet ds2 = TestDataUtil
|
||||||
.generateDistributionSets("NewDS", 3, softwareManagement, distributionSetManagement).get(0);
|
.generateDistributionSets("NewDS", 3, softwareManagement, distributionSetManagement).get(0);
|
||||||
|
|
||||||
ds2.setDescription("DS%");
|
ds2.setDescription("DS%");
|
||||||
ds2.getMetadata().add(new DistributionSetMetadata("metaKey", ds2, "value"));
|
ds2 = distributionSetManagement.updateDistributionSet(ds2);
|
||||||
distributionSetManagement.updateDistributionSet(ds2);
|
distributionSetManagement.createDistributionSetMetadata(new DistributionSetMetadata("metaKey", ds2, "value"));
|
||||||
|
|
||||||
final DistributionSetTag targetTag = tagManagement.createDistributionSetTag(new DistributionSetTag("Tag1"));
|
final DistributionSetTag targetTag = tagManagement.createDistributionSetTag(new DistributionSetTag("Tag1"));
|
||||||
tagManagement.createDistributionSetTag(new DistributionSetTag("Tag2"));
|
tagManagement.createDistributionSetTag(new DistributionSetTag("Tag2"));
|
||||||
|
|||||||
Reference in New Issue
Block a user