Commit 92ac1241 by sanshi

告警

parent ff09f2d7
......@@ -233,7 +233,7 @@ class TestProblemAcknowledge(object):
self.case_create(num="03", objectid=self.triggers_ids[0], acknowledged=0)
response = self.problem_acknowledge(eventids=[self.eventid], action=1)
self.check_code(response=response, code=0)
self.check_sql(eventid=self.eventid)
# self.check_sql(eventid=self.eventid)
@allure.title("problem.acknowledge:action=2 忽略一个告警")
@allure.story("告警忽略/关闭:action=2 忽略一个告警")
......@@ -253,9 +253,9 @@ class TestProblemAcknowledge(object):
eventid_3 = self.case_create(num="053", objectid=self.triggers_ids[2], acknowledged=0)
response = self.problem_acknowledge(eventids=[eventid_1, eventid_2, eventid_3], action=1)
self.check_code(response=response, code=0)
self.check_sql(eventid=eventid_1)
self.check_sql(eventid=eventid_2)
self.check_sql(eventid=eventid_3)
# self.check_sql(eventid=eventid_1)
# self.check_sql(eventid=eventid_2)
# self.check_sql(eventid=eventid_3)
@allure.title("problem.acknowledge:action=2 忽略多个告警")
@allure.story("告警忽略/关闭:action=2 忽略多个告警")
......@@ -278,11 +278,11 @@ if __name__ == "__main__":
import os
# 执行自动化测试用例
# case_info = os.path.split(__file__)
# case = UtilsCmd().pytest_cmd()
# r = UtilsPyTest(case=case, case_info=case_info)
# r.run_main()
a = TestProblemAcknowledge()
a.setup_class()
a.test_case_04()
case_info = os.path.split(__file__)
case = UtilsCmd().pytest_cmd()
r = UtilsPyTest(case=case, case_info=case_info)
r.run_main()
# a = TestProblemAcknowledge()
# a.setup_class()
# a.test_case_04()
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