/** * Test {@link QuotaDAO#getAllRelevantQuotasForVdsGroup(Guid)} fetching quota for user without * privileges for quota. */ @Test public void testGetRelevantVdsGroupQuotaForUserWithoutPrivileges() throws Exception { List<Quota> quotas = dao.getAllRelevantQuotasForVdsGroup( FixturesTool.VDS_GROUP_RHEL6_NFS, UNPRIVILEGED_USER_ID, true); assertEquals("Unprivileged user is not allowed to fetch for quota", 0, quotas.size()); }
/** Asserts that {@link #expectedQuotas} are relevant for the given {@link #vdsGroupId} */ private void assertGetAllRelevantQuoatsForVdsGroup(Guid vdsGroupId, int expectedQuotas) { List<Quota> quotas = dao.getAllRelevantQuotasForVdsGroup(vdsGroupId, null, false); assertEquals("Wrong number of quotas retuend", expectedQuotas, quotas.size()); }