Commit 741a77e9 authored by Yusei Tahara's avatar Yusei Tahara Committed by Klaus Wölfel

erp5/util/testnode: hosting subscription url was not updated once it was set....

erp5/util/testnode: hosting subscription url was not updated once it was set. As a result, since testnode watched an old destroyed instance, the next test never started. Thus don't store hosting subscription url. It changes from time to time.
parent 443f00d8
......@@ -67,7 +67,6 @@ class SlapOSMasterCommunicator(object):
self.slap_order = slap_order
self.slap_supply = slap_supply
self.hateoas_navigator = self.slap._hateoas_navigator
self.hosting_subscription_url = None
if url is not None and \
url.startswith(SOFTWARE_PRODUCT_NAMESPACE):
......@@ -183,18 +182,19 @@ class SlapOSMasterCommunicator(object):
@retryOnNetworkFailure
def getInstanceUrlList(self):
if self.hosting_subscription_url is None:
hosting_subscription_dict = self.hateoas_navigator._hateoas_getHostingSubscriptionDict()
for hs in hosting_subscription_dict:
if hs['title'] == self.name:
self.hosting_subscription_url = hs['href']
break
if self.hosting_subscription_url is None:
hosting_subscription_dict = self.hateoas_navigator._hateoas_getHostingSubscriptionDict()
# Don't store hosting subscription url. It changes from time to time.
hosting_subscription_url = None
for hs in hosting_subscription_dict:
if hs['title'] == self.name:
hosting_subscription_url = hs['href']
break
if hosting_subscription_url is None:
return None
return self.hateoas_navigator.getHateoasInstanceList(
self.hosting_subscription_url)
hosting_subscription_url)
@retryOnNetworkFailure
def getNewsFromInstance(self, url):
......
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