mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
engine-schema,test: fix domain searchbuilder, test check (#8725)
The SearchBuilder listDomainAndTypeAndNoTagSearch in ReservationDaoImpl.java is wrongly created by adding ACCOUNT_ID as part of the search param. Instead it should be DOMAIN_ID. Additional fixes in test cases to: - add assert - add spacing
This commit is contained in:
parent
6f27b1f459
commit
68a3e9e839
@ -59,7 +59,7 @@ public class ReservationDaoImpl extends GenericDaoBase<ReservationVO, Long> impl
|
||||
listDomainAndTypeSearch.done();
|
||||
|
||||
listDomainAndTypeAndNoTagSearch = createSearchBuilder();
|
||||
listDomainAndTypeAndNoTagSearch.and(ACCOUNT_ID, listDomainAndTypeAndNoTagSearch.entity().getAccountId(), SearchCriteria.Op.EQ);
|
||||
listDomainAndTypeAndNoTagSearch.and(DOMAIN_ID, listDomainAndTypeAndNoTagSearch.entity().getDomainId(), SearchCriteria.Op.EQ);
|
||||
listDomainAndTypeAndNoTagSearch.and(RESOURCE_TYPE, listDomainAndTypeAndNoTagSearch.entity().getResourceType(), SearchCriteria.Op.EQ);
|
||||
listDomainAndTypeAndNoTagSearch.and(RESOURCE_TAG, listDomainAndTypeAndNoTagSearch.entity().getTag(), SearchCriteria.Op.NULL);
|
||||
listDomainAndTypeAndNoTagSearch.done();
|
||||
|
||||
@ -348,7 +348,7 @@ public class QueryManagerImplTest {
|
||||
|
||||
@Test
|
||||
public void testGetHostTagsFromTemplateForServiceOfferingsListingNoTemplateId() {
|
||||
CollectionUtils.isEmpty(queryManager.getHostTagsFromTemplateForServiceOfferingsListing(Mockito.mock(AccountVO.class), null));
|
||||
Assert.assertTrue(CollectionUtils.isEmpty(queryManager.getHostTagsFromTemplateForServiceOfferingsListing(Mockito.mock(AccountVO.class), null)));
|
||||
}
|
||||
|
||||
@Test(expected = InvalidParameterValueException.class)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user