Fix ACM tests (#2739)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -39,11 +39,11 @@ class SoftwareModuleManagementTest extends AbstractAccessControllerManagementTes
|
||||
Assertions.<SoftwareModule> assertThat(softwareModuleManagement.findByRsql("name==*", UNPAGED)).containsExactly(sm1Type1);
|
||||
Assertions.assertThat(softwareModuleManagement.countByRsql("name==*")).isEqualTo(1);
|
||||
|
||||
final Long sm2Type2Id = sm2Type2.getId();
|
||||
Assertions.<SoftwareModule> assertThat(softwareModuleManagement.findByAssignedTo(sm2Type2Id, UNPAGED).toList())
|
||||
Assertions.<SoftwareModule> assertThat(softwareModuleManagement.findByAssignedTo(ds2Type2.getId(), UNPAGED).toList())
|
||||
.containsExactly(sm1Type1); // no sm2Type2
|
||||
|
||||
assertThat(softwareModuleManagement.getMetadata(sm1Type1.getId())).isEmpty();
|
||||
final Long sm2Type2Id = sm2Type2.getId();
|
||||
assertThatExceptionOfType(EntityNotFoundException.class).isThrownBy(() -> softwareModuleManagement.getMetadata(sm2Type2Id));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -117,10 +117,10 @@ class TargetManagementTest extends AbstractAccessControllerManagementTest {
|
||||
.isInstanceOf(InsufficientPermissionException.class);
|
||||
|
||||
// find by tags
|
||||
assertThat(targetManagement.findByTag(targetType2.getId(), UNPAGED))
|
||||
assertThat(targetManagement.findByTag(targetTag2.getId(), UNPAGED))
|
||||
.extracting(Identifiable::getId)
|
||||
.containsOnly(target1Type1.getId());
|
||||
assertThat(targetManagement.findByRsqlAndTag("id==*", targetType2.getId(), UNPAGED))
|
||||
assertThat(targetManagement.findByRsqlAndTag("id==*", targetTag2.getId(), UNPAGED))
|
||||
.extracting(Identifiable::getId)
|
||||
.containsOnly(target1Type1.getId());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user