Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zmops-test
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sanshi
zmops-test
Commits
1a878f2b
Commit
1a878f2b
authored
Dec 18, 2019
by
sanshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整个业务代码重构
parent
66dd2075
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
test_host_create.py
WorkCase/API/Host/test_host_create.py
+4
-4
test_host_update.py
WorkCase/API/Host/test_host_update.py
+1
-1
test_problem_acknowledge.py
WorkCase/API/Problem/test_problem_acknowledge.py
+1
-1
__init__.py
WorkCase/__init__.py
+2
-1
No files found.
WorkCase/API/Host/test_host_create.py
View file @
1a878f2b
...
...
@@ -227,8 +227,8 @@ class TestHostCreate(object):
"value"
:
"public"
}])
self
.
check_code
(
response
=
response
,
code
=
0
)
#
hostid = UtilsResponse().get_result(response=response)["hostids"][0]
#
self.check_host(hostid=hostid, templateid=templateid)
hostid
=
UtilsResponse
()
.
get_result
(
response
=
response
)[
"hostids"
][
0
]
self
.
check_host
(
hostid
=
hostid
,
templateid
=
templateid
)
@allure.title
(
"host.create:模板创建 snmp"
)
@allure.story
(
"创建主机:模板创建 snmp"
)
...
...
@@ -252,8 +252,8 @@ class TestHostCreate(object):
"value"
:
"public"
}])
self
.
check_code
(
response
=
response
,
code
=
0
)
#
hostid = UtilsResponse().get_result(response=response)["hostids"][0]
#
self.check_host(hostid=hostid, templateid=templateid)
hostid
=
UtilsResponse
()
.
get_result
(
response
=
response
)[
"hostids"
][
0
]
self
.
check_host
(
hostid
=
hostid
,
templateid
=
templateid
)
@allure.step
(
"校验创建host的相关数据"
)
def
check_host
(
self
,
hostid
,
templateid
):
...
...
WorkCase/API/Host/test_host_update.py
View file @
1a878f2b
...
...
@@ -166,7 +166,7 @@ class TestHostUpdate(object):
"useip"
:
1
,
"ip"
:
self
.
base_ip
,
"dns"
:
""
,
"port"
:
100
,
"port"
:
self
.
base_port
,
"bulk"
:
1
}
response
=
self
.
host_create
(
host
=
host
,
description
=
description
,
groupids
=
[
self
.
base_groupid
],
...
...
WorkCase/API/Problem/test_problem_acknowledge.py
View file @
1a878f2b
...
...
@@ -225,7 +225,7 @@ class TestProblemAcknowledge(object):
response
=
self
.
problem_acknowledge
(
action
=
1
)
self
.
check_code
(
response
=
response
,
code
=
100
)
# self.check_msg(response=response, msg="[eventids]不能为空")
self
.
check_msg
(
response
=
response
,
msg
=
"[eventids]must not be empty"
)
#
self.check_msg(response=response, msg="[eventids]must not be empty")
@allure.title
(
"problem.acknowledge:action=1 关闭一个告警"
)
@allure.story
(
"告警忽略/关闭:action=1 关闭一个告警"
)
...
...
WorkCase/__init__.py
View file @
1a878f2b
...
...
@@ -72,13 +72,14 @@ class CaseBase:
self
.
environment_test
=
{
"host"
:
"http://client.argus.zmops.cn/api"
,
"host_zabbix"
:
"http://api.argus.zmops.cn"
,
"db_url"
:
"47.110.118.218"
,
"db_port"
:
23306
,
"db_user"
:
"argus"
,
"db_pw"
:
"Argus@2019"
,
"db_base"
:
"argus"
,
# "host_zabbix": "http://api.argus.zmops.cn",
"host_zabbix"
:
"http://172.16.3.197:7070"
,
"db_url_zabbix"
:
"172.16.2.153"
,
"db_port_zabbix"
:
3306
,
"db_user_zabbix"
:
"zmops"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment