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