Skip to content
Snippets Groups Projects
Commit e03ce4aa authored by Thomas Jürges's avatar Thomas Jürges
Browse files

Task #11072: Added a test for no claimable resources.

parent ffaedf0c
No related branches found
No related tags found
No related merge requests found
......@@ -1210,6 +1210,17 @@ class ResourceAvailabilityCheckerTest(unittest.TestCase):
self.uut = ResourceAvailabilityChecker(self.rarpc_mock)
def test_fit_single_resource_no_claimable_resources(self):
"""
Given 1 needed resource, and 0 claimable resources, fit_single_resources should return
failure.
"""
needed_resources_by_type_id = {5: 500}
claimable_resources_list = []
with self.assertRaises(CouldNotFindClaimException):
self.uut._get_tentative_claim_objects_for_single_resource(needed_resources_by_type_id, claimable_resources_list)
def test_fit_single_resources_fit_one_disk(self):
"""
Given 1 needed resource, and 1 claimable resource that fits, fit_single_resources should return succesful.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment