Commit 362be953 authored by Romain Courteaud's avatar Romain Courteaud 🐙

slapos_cloud: person need right assignment

parent 505366e2
......@@ -75,14 +75,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):
......@@ -367,6 +370,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