@@ -470,9 +470,7 @@ class TestComputeNode_getNewsDict(TestSlapOSHalJsonStyleMixin):
compute_node=self._makeComputeNode()
self._logFakeAccess(compute_node)
news_dict=compute_node.ComputeNode_getNewsDict()
monitor_url='https://monitor.app.officejs.com/#/?page=ojsm_dispatch&query=portal_type:"Software Instance" AND aggregate_reference:%s'%(compute_node.getReference())
expected_news_dict={'compute_node':
{'created_at':self.created_at,
expected_news_dict={'created_at':self.created_at,
'no_data_since_15_minutes':0,
'no_data_since_5_minutes':0,
'portal_type':compute_node.getPortalType(),
...
...
@@ -480,12 +478,7 @@ class TestComputeNode_getNewsDict(TestSlapOSHalJsonStyleMixin):
'since':self.created_at,
'state':'start_requested',
'text':'#access OK',
'user':'SlapOS Master'},
'partition':{},
'portal_type':compute_node.getPortalType(),
'reference':compute_node.getReference(),
'monitor_url':monitor_url
}
'user':'SlapOS Master'}
self.assertEqual(_decode_with_json(news_dict),
_decode_with_json(expected_news_dict))
self.tic()
...
...
@@ -500,10 +493,8 @@ class TestComputeNode_getNewsDict(TestSlapOSHalJsonStyleMixin):
monitor_url='https://monitor.app.officejs.com/#/?page=ojsm_dispatch&query=portal_type:"Software Instance" AND aggregate_reference:%s'%(compute_node.getReference())
expected_news_dict={'compute_node':
{'created_at':self.created_at,
expected_news_dict={'created_at':self.created_at,
'no_data_since_15_minutes':0,
'no_data_since_5_minutes':0,
'portal_type':compute_node.getPortalType(),
...
...
@@ -511,11 +502,7 @@ class TestComputeNode_getNewsDict(TestSlapOSHalJsonStyleMixin):
'since':self.created_at,
'state':'stop_requested',
'text':'#access OK',
'user':'SlapOS Master'},
'partition':{},
'portal_type':compute_node.getPortalType(),
'reference':compute_node.getReference(),
'monitor_url':monitor_url
'user':'SlapOS Master'
}
self.assertEqual(_decode_with_json(news_dict),
_decode_with_json(expected_news_dict))
...
...
@@ -531,10 +518,8 @@ class TestComputeNode_getNewsDict(TestSlapOSHalJsonStyleMixin):
monitor_url='https://monitor.app.officejs.com/#/?page=ojsm_dispatch&query=portal_type:"Software Instance" AND aggregate_reference:%s'%(compute_node.getReference())
expected_news_dict={'compute_node':
{'created_at':self.created_at,
expected_news_dict={'created_at':self.created_at,
'no_data_since_15_minutes':0,
'no_data_since_5_minutes':0,
'portal_type':compute_node.getPortalType(),
...
...
@@ -542,11 +527,7 @@ class TestComputeNode_getNewsDict(TestSlapOSHalJsonStyleMixin):
'since':self.created_at,
'state':'destroy_requested',
'text':'#access OK',
'user':'SlapOS Master'},
'partition':{},
'portal_type':compute_node.getPortalType(),
'reference':compute_node.getReference(),
'monitor_url':monitor_url
'user':'SlapOS Master'
}
self.assertEqual(_decode_with_json(news_dict),
_decode_with_json(expected_news_dict))
...
...
@@ -559,20 +540,14 @@ class TestComputeNode_getNewsDict(TestSlapOSHalJsonStyleMixin):
deftest_no_data(self):
compute_node=self._makeComputeNode()
news_dict=compute_node.ComputeNode_getNewsDict()
monitor_url='https://monitor.app.officejs.com/#/?page=ojsm_dispatch&query=portal_type:"Software Instance" AND aggregate_reference:%s'%(compute_node.getReference())
expected_news_dict={'compute_node':
{'created_at':self.created_at,
'no_data':1,
'portal_type':compute_node.getPortalType(),
'reference':compute_node.getReference(),
'since':self.created_at,
'state':'',
'text':'#error no data found for %s'%compute_node.getReference(),
'user':'SlapOS Master'},
'partition':{},
expected_news_dict={'created_at':self.created_at,
'no_data':1,
'portal_type':compute_node.getPortalType(),
'reference':compute_node.getReference(),
'monitor_url':monitor_url
'since':self.created_at,
'state':'',
'text':'#error no data found for %s'%compute_node.getReference(),
'user':'SlapOS Master'
}
self.assertEqual(_decode_with_json(news_dict),
_decode_with_json(expected_news_dict))
...
...
@@ -586,32 +561,19 @@ class TestComputeNode_getNewsDict(TestSlapOSHalJsonStyleMixin):
compute_node=self._makeComputeNode()
instance=self._makeInstance()
instance.setAggregateValue(self.partition0)
monitor_url='https://monitor.app.officejs.com/#/?page=ojsm_dispatch&query=portal_type:"Software Instance" AND aggregate_reference:%s'%(compute_node.getReference())