Commit 10f8361f authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: Allocation Supply need an aggregated Node

parent 3a662fb5
...@@ -57,6 +57,11 @@ class TestSlapOSAllocationSupply(SlapOSTestCaseMixin): ...@@ -57,6 +57,11 @@ class TestSlapOSAllocationSupply(SlapOSTestCaseMixin):
person_1 = self.portal.person_module.newContent() person_1 = self.portal.person_module.newContent()
person_2 = self.portal.person_module.newContent() person_2 = self.portal.person_module.newContent()
# create 1 compute node
compute_node_1 = self.portal.compute_node_module.newContent(
portal_type="Compute Node"
)
# Create 2 allocation supplies # Create 2 allocation supplies
# - one for everybody (no destination) # - one for everybody (no destination)
# - one for one specific user # - one for one specific user
...@@ -64,12 +69,14 @@ class TestSlapOSAllocationSupply(SlapOSTestCaseMixin): ...@@ -64,12 +69,14 @@ class TestSlapOSAllocationSupply(SlapOSTestCaseMixin):
everybody_supply = self.portal.allocation_supply_module.newContent( everybody_supply = self.portal.allocation_supply_module.newContent(
title="Everybody Supply", title="Everybody Supply",
start_date_range_min=now, start_date_range_min=now,
destination_project_value=project_1 destination_project_value=project_1,
aggregate_value=compute_node_1
) )
person_1_supply = self.portal.allocation_supply_module.newContent( person_1_supply = self.portal.allocation_supply_module.newContent(
title="Person 1 Supply", title="Person 1 Supply",
start_date_range_min=now, start_date_range_min=now,
destination_project_value=project_1, destination_project_value=project_1,
aggregate_value=compute_node_1,
destination_value=person_1 destination_value=person_1
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment