Commit 7c856165 authored by Romain Courteaud's avatar Romain Courteaud 🐙

slapos_cloud: person need right assignment

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