Commit 610ae827 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: rebase fixup

parent 2a4d1eea
......@@ -204,9 +204,8 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
server.edit(
allocation_scope='open/subscription')
self.assertEqual('open/subscription', server.getAllocationScope())
# Called by alarm
server.ComputeNode_checkAndUpdateCapacityScope()
self.assertEqual('open', server.getCapacityScope())
self.assertEqual('close', server.getCapacityScope())
server.edit(capacity_scope='open')
self.tic()
@changeSkin('RJS')
......@@ -214,8 +213,6 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
server.edit(
allocation_scope='open/personal', subject_list=[])
self.assertEqual('open/personal', server.getAllocationScope())
# Called by alarm
server.ComputeNode_checkAndUpdateCapacityScope()
self.assertEqual('open', server.getCapacityScope())
self.tic()
......
......@@ -359,8 +359,7 @@ class TestSlapOSGarbageCollectDestroyedRootTreeAlarm(SlapOSTestCaseMixin):
)
class TestSlapOSComputeNode_checkAndUpdateCapacityScope(SlapOSTestCaseMixin):
allocation_scope_to_test = 'open'
class TestSlapOSUpdateComputeNodeCapacityScopeAlarm(SlapOSTestCaseMixin):
def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self)
......@@ -368,7 +367,7 @@ class TestSlapOSComputeNode_checkAndUpdateCapacityScope(SlapOSTestCaseMixin):
self.compute_node = self.portal.compute_node_module.template_compute_node\
.Base_createCloneDocument(batch_mode=1)
self.compute_node.edit(
allocation_scope=self.allocation_scope_to_test,
allocation_scope='open',
reference='TESTC-%s' % self.generateNewId(),
follow_up_value=self.project
)
......@@ -481,20 +480,6 @@ class TestSlapOSComputeNode_checkAndUpdateCapacityScope(SlapOSTestCaseMixin):
self.assertEqual("Compute Node reported an error",
self.compute_node.workflow_history['edit_workflow'][-1]['comment'])
<<<<<<< HEAD
def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self)
self.compute_node = self.portal.compute_node_module.template_compute_node\
.Base_createCloneDocument(batch_mode=1)
self.compute_node.edit(
allocation_scope='open/public',
reference='TESTC-%s' % self.generateNewId(),
)
self.compute_node.edit(capacity_scope='open')
self.compute_node.validate()
self.compute_node.setAccessStatus("#access ok")
transaction.commit()
def test_alarm(self):
self._test_alarm(
self.portal.portal_alarms.slapos_update_compute_node_capacity_scope,
......@@ -502,10 +487,6 @@ class TestSlapOSComputeNode_checkAndUpdateCapacityScope(SlapOSTestCaseMixin):
'ComputeNode_checkAndUpdateCapacityScope'
)
def test_alarm_open(self):
self.compute_node.edit(allocation_scope='open')
self.test_alarm()
def test_alarm_non_public(self):
self.compute_node.edit(allocation_scope='close')
self._test_alarm_not_visited(
......
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