Commit 66c92e38 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_pdm: Ensure objects are indexed before run the alarm

The order of execution of activities are not linear anymore, so this require ensure objects are indexed to be found by the alarm.
parent 2d40b1a7
......@@ -120,7 +120,8 @@ return %s
computer2.edit(allocation_scope = 'open/personal')
computer3 = self._makeComputer(self.generateNewId())
computer3.edit(allocation_scope = 'open/friend')
self.tic()
self._simulateScript('Computer_checkAndCreateUpgradeDecision')
try:
self.portal.portal_alarms.slapos_pdm_computer_create_upgrade_decision.\
......@@ -142,7 +143,9 @@ return %s
hosting_subscription = self._makeHostingSubscription()
hosting_subscription2 = self._makeHostingSubscription()
hosting_subscription3 = self._makeHostingSubscription()
self.tic()
self._simulateScript('HostingSubscription_createUpgradeDecision')
try:
self.portal.portal_alarms.slapos_pdm_hosting_subscription_create_upgrade_decision.\
......@@ -163,7 +166,8 @@ return %s
def test_alarm_create_upgrade_decision_destroyed_hosting_subscription(self):
hosting_subscription = self._makeHostingSubscription(slap_state="destroy_requested")
hosting_subscription2 = self._makeHostingSubscription(slap_state="destroy_requested")
self.tic()
self._simulateScript('HostingSubscription_createUpgradeDecision')
try:
self.portal.portal_alarms.slapos_pdm_hosting_subscription_create_upgrade_decision.\
......@@ -183,7 +187,8 @@ return %s
computer.edit(allocation_scope = 'close/oudtated')
computer2 = self._makeComputer(self.generateNewId())
computer2.edit(allocation_scope = 'close/maintenance')
self.tic()
self._simulateScript('Computer_checkAndCreateUpgradeDecision')
try:
self.portal.portal_alarms.slapos_pdm_computer_create_upgrade_decision.\
......
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