Commit 9e5f5f94 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud:

* test: allow to disable alarm when validation a allocation supply
* test: drop reference to an outdated alarm
parent a5b140a4
......@@ -345,9 +345,6 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
self.portal.portal_workflow._jumpToStateFor(self.requested_software_instance, 'start_requested')
self.requested_software_instance.validate()
self.tic()
# XXX Not part of slapos cloud
self.portal.portal_alarms.slapos_request_update_instance_tree_open_sale_order.activeSense()
self.tic()
def _makeSlaveTree(self, project, requested_template_id='template_slave_instance'):
return self._makeTree(project, requested_template_id=requested_template_id)
......@@ -822,7 +819,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
def addAllocationSupply(self, title, node, software_product,
software_release, software_type,
destination_value=None,
is_slave_on_same_instance_tree_allocable=False):
is_slave_on_same_instance_tree_allocable=False,
disable_alarm=False):
allocation_supply = self.portal.allocation_supply_module.newContent(
portal_type="Allocation Supply",
title=title,
......@@ -861,7 +859,12 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
predicate_category_list=cell_key,
variation_category_list=cell_key
)
allocation_supply.validate()
if disable_alarm:
# disable generation of Upgrade Decision
with TemporaryAlarmScript(self.portal, 'Base_reindexAndSenseAlarm', "'disabled'"):
allocation_supply.validate()
else:
allocation_supply.validate()
return allocation_supply
def generateNewSoftwareReleaseUrl(self):
......
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