Fix ACM tests (#2739)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-10-10 12:58:59 +03:00
committed by GitHub
parent 741add9f21
commit ebc3755469
2 changed files with 4 additions and 4 deletions

View File

@@ -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));
});
}

View File

@@ -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());
});