Add test B critical status in class service inside service
This commit is contained in:
parent
9aedc8c58e
commit
0fd78ee4a0
|
@ -331,7 +331,9 @@ class serviceInsideService(PandoraWebDriverTestCase):
|
|||
create_service(driver,father_service_name,"Applications",self.agent_name,description="this is the father service",mode="manual")
|
||||
|
||||
add_elements_to_service(driver,father_service_name,"Service",service_to_add=father_service_name,description=service_name,ok_weight="0.2")
|
||||
|
||||
|
||||
force_service(driver,service_name)
|
||||
|
||||
force_service(driver,father_service_name)
|
||||
|
||||
search_service(driver,father_service_name,go_to_service=False)
|
||||
|
@ -339,6 +341,36 @@ class serviceInsideService(PandoraWebDriverTestCase):
|
|||
element = driver.find_element_by_xpath('//td/img[@data-title="Ok"]')
|
||||
self.assertIsInstance(element,WebElement)
|
||||
|
||||
@is_enterprise
|
||||
def test_B_service_critical(self):
|
||||
|
||||
u"""
|
||||
Comprobar que un servicio padre hereda el estado del hijo, en este caso "warning"
|
||||
"""
|
||||
|
||||
father_service_name = gen_random_string(6)
|
||||
service_name = gen_random_string(6)
|
||||
|
||||
driver = self.driver
|
||||
|
||||
#Creamos el servicio añadiendo el modulo ok y warning y el servicio será critical
|
||||
create_service(driver,service_name,"Applications",self.agent_name,description=service_name,mode="manual",critical="1",warning="0.5")
|
||||
add_elements_to_service(driver,service_name,"Module",agent_name=self.agent_name,module=self.module_ok_1_name,description=self.module_ok_1_name,ok_weight="0.5")
|
||||
add_elements_to_service(driver,service_name,"Module",agent_name=self.agent_name,module=self.module_critical_1_name,description=self.module_critical_1_name,critical_weight="0.5")
|
||||
|
||||
#Creamos el servicio padre
|
||||
create_service(driver,father_service_name,"Applications",self.agent_name,description="this is the father service",mode="manual")
|
||||
|
||||
add_elements_to_service(driver,father_service_name,"Service",service_to_add=father_service_name,description=service_name,ok_weight="0.2")
|
||||
|
||||
force_service(driver,service_name)
|
||||
|
||||
force_service(driver,father_service_name)
|
||||
|
||||
search_service(driver,father_service_name,go_to_service=False)
|
||||
|
||||
element = driver.find_element_by_xpath('//td/img[@data-title="Critical"]')
|
||||
self.assertIsInstance(element,WebElement)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest2.main()
|
||||
|
|
Loading…
Reference in New Issue