Commit 546c017a authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: person need right assignment

parent a96ce52e
......@@ -87,14 +87,17 @@ class TestSlapOSCoreComputeNodeSlapInterfaceWorkflow(SlapOSTestCaseMixin):
def test_approveComputeNodeRegistration(self):
self.person_user = self.makePerson(self.project)
self.addProjectProductionManagerAssignment(self.person_user, self.project)
self.tic()
self.login(self.person_user.getUserId())
compute_node = self.portal.compute_node_module.newContent(portal_type='Compute Node',
compute_node = self.portal.compute_node_module.newContent(
portal_type='Compute Node',
title="Compute Node %s for %s" % (self.new_id, self.person_user.getReference()),
reference="TESTCOMP-%s" % self.new_id)
reference="TESTCOMP-%s" % self.new_id,
follow_up_value=self.project
)
compute_node.approveComputeNodeRegistration()
self.assertEqual('open/personal', compute_node.getAllocationScope())
self.assertEqual(self.person_user.getRelativeUrl(),
compute_node.getSourceAdministration())
self.assertEqual('open', compute_node.getAllocationScope())
self.assertEqual('validated', compute_node.getValidationState())
def _countInstanceBang(self, instance, comment):
......@@ -492,6 +495,8 @@ class TestSlapOSCoreComputeNodeSlapInterfaceWorkflowSupply(SlapOSTestCaseMixin):
.Base_createCloneDocument(batch_mode=1)
# Clone person document
person_user = self.makePerson(self.project, new_id=self.new_id, index=0)
self.addProjectProductionManagerAssignment(person_user, self.project)
self.tic()
compute_node.edit(
title="Compute Node %s for %s" % (self.new_id, person_user.getReference()),
......
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