mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +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();
|
listDomainAndTypeSearch.done();
|
||||||
|
|
||||||
listDomainAndTypeAndNoTagSearch = createSearchBuilder();
|
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_TYPE, listDomainAndTypeAndNoTagSearch.entity().getResourceType(), SearchCriteria.Op.EQ);
|
||||||
listDomainAndTypeAndNoTagSearch.and(RESOURCE_TAG, listDomainAndTypeAndNoTagSearch.entity().getTag(), SearchCriteria.Op.NULL);
|
listDomainAndTypeAndNoTagSearch.and(RESOURCE_TAG, listDomainAndTypeAndNoTagSearch.entity().getTag(), SearchCriteria.Op.NULL);
|
||||||
listDomainAndTypeAndNoTagSearch.done();
|
listDomainAndTypeAndNoTagSearch.done();
|
||||||
|
|||||||
@ -348,7 +348,7 @@ public class QueryManagerImplTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetHostTagsFromTemplateForServiceOfferingsListingNoTemplateId() {
|
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)
|
@Test(expected = InvalidParameterValueException.class)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user