提交 c35716a7 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!74 修改test单元测试内容,以适配新的数据库结构和回显结构

Merge pull request !74 from tomtao/master
...@@ -75,7 +75,7 @@ class InstallDepend(): ...@@ -75,7 +75,7 @@ class InstallDepend():
response_code: response code response_code: response code
Raises: Raises:
""" """
result_list = self.__search_db.get_install_depend(self.__search_list) result_list = set(self.__search_db.get_install_depend(self.__search_list))
for search in self.__search_list: for search in self.__search_list:
if search not in self.binary_dict.dictionary: if search not in self.binary_dict.dictionary:
self.binary_dict.init_key(key=search, parent_node=[]) self.binary_dict.init_key(key=search, parent_node=[])
......
...@@ -64,7 +64,7 @@ class Log(): ...@@ -64,7 +64,7 @@ class Log():
if path: if path:
self.__path = os.path.join(LOG_FOLDER_PATH, path) self.__path = os.path.join(LOG_FOLDER_PATH, path)
else: else:
self.__path = READCONFIG.get_system('log_path') self.__path = READCONFIG.get_config('LOG', 'log_path')
if not self.__path: if not self.__path:
self.__path = os.path.join(LOG_FOLDER_PATH, log_name) self.__path = os.path.join(LOG_FOLDER_PATH, log_name)
else: else:
......
Name: pkgship Name: pkgship
Version: 1.0 Version: 1.0.0
Release: 5 Release: 6
Summary: Pkgship implements rpm package dependence ,maintainer, patch query and so no. Summary: Pkgship implements rpm package dependence ,maintainer, patch query and so no.
License: Mulan 2.0 License: Mulan 2.0
URL: https://gitee.com/openeuler/openEuler-Advisor URL: https://gitee.com/openeuler/openEuler-Advisor
...@@ -8,6 +8,8 @@ Source0: https://gitee.com/openeuler/openEuler-Advisor/pkgship-%{version} ...@@ -8,6 +8,8 @@ Source0: https://gitee.com/openeuler/openEuler-Advisor/pkgship-%{version}
BuildArch: noarch BuildArch: noarch
BuildRequires: python3-flask-restful python3-flask python3 python3-pyyaml python3-sqlalchemy
BuildRequires: python3-prettytable python3-requests python3-flask-session python3-flask-script python3-marshmallow
Requires: python3-pip python3-flask-restful python3-flask python3 python3-pyyaml Requires: python3-pip python3-flask-restful python3-flask python3 python3-pyyaml
Requires: python3-sqlalchemy python3-prettytable python3-requests Requires: python3-sqlalchemy python3-prettytable python3-requests
Requires: python3-pyinstaller python3-flask-session python3-flask-script python3-marshmallow python3-uWSGI Requires: python3-pyinstaller python3-flask-session python3-flask-script python3-marshmallow python3-uWSGI
...@@ -26,7 +28,11 @@ Pkgship implements rpm package dependence ,maintainer, patch query and so no. ...@@ -26,7 +28,11 @@ Pkgship implements rpm package dependence ,maintainer, patch query and so no.
%check %check
# change log_path to solve default log_path permission denied problem
log_path=`pwd`/tmp/
sed -i "/\[LOG\]/a\log_path=$log_path" test/common_files/package.ini
%{__python3} -m unittest test/run_tests.py %{__python3} -m unittest test/run_tests.py
rm -rf $log_path
%post %post
#build cli bin #build cli bin
...@@ -61,6 +67,10 @@ rm -rf %{python3_sitelib}/packageship/build %{python3_sitelib}/packageship/dist ...@@ -61,6 +67,10 @@ rm -rf %{python3_sitelib}/packageship/build %{python3_sitelib}/packageship/dist
%changelog %changelog
* Wed Aug 12 2020 Zhang Tao <zhangtao306@huawei.com> - 1.0.0-6
- Fix the test content to adapt to the new data structure, add BuildRequires for running %check
* Mon Aug 10 2020 Zhengtang Gong <gongzhengtang@huawei.com> - 1.0-5 * Mon Aug 10 2020 Zhengtang Gong <gongzhengtang@huawei.com> - 1.0-5
- Command line supports calling remote services - Command line supports calling remote services
......
...@@ -34,8 +34,8 @@ class InitConf: ...@@ -34,8 +34,8 @@ class InitConf:
"data_{}_src.sqlite".format(str(index))) "data_{}_src.sqlite".format(str(index)))
bin_path = os.path.join(base_path, "db_origin", bin_path = os.path.join(base_path, "db_origin",
"data_{}_bin.sqlite".format(str(index))) "data_{}_bin.sqlite".format(str(index)))
obj["src_db_file"] = [src_path] obj["src_db_file"] = src_path
obj["bin_db_file"] = [bin_path] obj["bin_db_file"] = bin_path
with open(conf_path, 'w', encoding='utf-8') as w_f: with open(conf_path, 'w', encoding='utf-8') as w_f:
yaml.dump(origin_yaml, w_f) yaml.dump(origin_yaml, w_f)
......
- bin_db_file: - bin_db_file:
- C:\Users\14500\Desktop\workspace\openEuler_pkgmnt\openEuler_Advisor\packageship\test\common_files\db_origin\data_1_bin.sqlite dbname: mainline
dbname: openEuler-20.03-LTS
priority: 1 priority: 1
src_db_file: src_db_file:
- C:\Users\14500\Desktop\workspace\openEuler_pkgmnt\openEuler_Advisor\packageship\test\common_files\db_origin\data_1_src.sqlite
status: enable status: enable
- bin_db_file: - bin_db_file:
- C:\Users\14500\Desktop\workspace\openEuler_pkgmnt\openEuler_Advisor\packageship\test\common_files\db_origin\data_2_bin.sqlite dbname: fedora30
dbname: openEuler-20.04-LTS
priority: 2 priority: 2
src_db_file: src_db_file:
- C:\Users\14500\Desktop\workspace\openEuler_pkgmnt\openEuler_Advisor\packageship\test\common_files\db_origin\data_2_src.sqlite
status: enable status: enable
[ [
{ {
"input": { "input": {
"packagename": "A", "packagename": "A",
"dbname":"openEuler-20.03-LTS" "dbname": "mainline"
}, },
"output": { "output": {
"code": "2001", "code": "2001",
"data": { "data": {
"A1": [ "A1": [
"A",
"0.0.23b",
"openEuler-20.03-LTS",
[
[
"B",
"build"
],
[
"D",
"build"
],
[
"D1",
"install"
],
[
"B1",
"install"
]
]
],
"A2": [
"A",
"0.0.23b",
"openEuler-20.03-LTS",
[
[
"C",
"build"
],
[
"C1",
"install"
],
[
"A1",
"install"
]
]
],
"A_src": [
"source",
"0.0.23b",
"openEuler-20.03-LTS",
[
[
"root",
null
]
]
],
"B1": [
"B",
"0.0.2",
"openEuler-20.03-LTS",
[
[
"A", "A",
"build" "0.0.23b",
"mainline",
[
[
"B",
"build"
],
[
"D",
"build"
],
[
"D1",
"install"
],
[
"B1",
"install"
]
]
], ],
[ "A2": [
"D",
"build"
]
]
],
"B2": [
"B",
"0.0.2",
"openEuler-20.03-LTS",
[
[
"C",
"build"
]
]
],
"C1": [
"C",
"0.1",
"openEuler-20.03-LTS",
[
[
"A", "A",
"build" "0.0.23b",
"mainline",
[
[
"C",
"build"
],
[
"C1",
"install"
],
[
"A1",
"install"
]
]
], ],
[ "A_src": [
"source",
"0.0.23b",
"mainline",
[
[
"root",
null
]
]
],
"B1": [
"B", "B",
"build" "0.0.2",
"mainline",
[
[
"A",
"build"
],
[
"D",
"build"
]
]
], ],
[ "B2": [
"A2", "B",
"install" "0.0.2",
"mainline",
[
[
"C",
"build"
]
]
], ],
[ "C1": [
"B2", "C",
"install" "0.1",
] "mainline",
] [
], [
"D1": [ "A",
"D", "build"
"0.11", ],
"openEuler-20.03-LTS", [
[ "B",
[ "build"
"D2", ],
"install" [
"A2",
"install"
],
[
"B2",
"install"
]
]
], ],
[ "D1": [
"A2", "D",
"install" "0.11",
"mainline",
[
[
"D2",
"install"
],
[
"A2",
"install"
]
]
] ]
] },
] "msg": "Successful Operation!"
}, }
"msg": "Successful Operation!" }
}} ]
] \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"A_src": [ "A_src": [
"source", "source",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"B1": [ "B1": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A", "A",
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
"C1": [ "C1": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A", "A",
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
"A1": [ "A1": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"B1", "B1",
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
"A2": [ "A2": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A1", "A1",
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
"D1": [ "D1": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
......
[{ [
"database_name": "openEuler-20.03-LTS", {
"priority": 1, "database_name": "mainline",
"status": "enable" "priority": 1,
}, { "status": "enable"
"database_name": "openEuler-20.04-LTS", },
"priority": 2, {
"status": "enable" "database_name": "fedora30",
}] "priority": 2,
\ No newline at end of file "status": "enable"
}
]
\ No newline at end of file
[{ [
"buildDep": ["B1", "C1"], {
"dbname": "openEuler-20.03-LTS", "url": "/packages/packageInfo?sourceName=A&dbName=mainline",
"downloadURL": null, "data": [
"license": "GPLv2+ and BSD and MIT and IBM", {
"maintainer": null, "buildDep": [
"maintainlevel": null, "B1",
"sourceName": "A", "C1"
"sourceURL": "http://play0ad.com", ],
"subpack": { "dbname": "mainline",
"A1": ["A2"], "license": "GPLv2+ and BSD and MIT and IBM",
"A2": ["C1", "D1"] "maintainer": null,
}, "maintainlevel": null,
"version": "0.0.23b" "rpm_packager": "Fedora Project",
}] "sourceName": "A",
\ No newline at end of file "sourceURL": "http://play0ad.com",
"subpack": {
"A1": [
"A2"
],
"A2": [
"C1",
"D1"
]
},
"version": "0.0.23b"
}
]
}
]
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"A1": [ "A1": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
"A2": [ "A2": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A1", "A1",
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
"C1": [ "C1": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
"D1": [ "D1": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
"A1": [ "A1": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"D1", "D1",
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
"A2": [ "A2": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A1", "A1",
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
"C1": [ "C1": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
"D1": [ "D1": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"D2", "D2",
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
"D2": [ "D2": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
"C2": [ "C2": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
......
[{ [{
"dbname": "openEuler-20.03-LTS", "dbname": "mainline",
"downloadURL": null, "downloadURL": null,
"license": "GPLv2+ and BSD and MIT and IBM", "license": "GPLv2+ and BSD and MIT and IBM",
"maintainer": null, "maintainer": null,
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"sourceURL": "http://play0ad.com", "sourceURL": "http://play0ad.com",
"version": "0.0.23b" "version": "0.0.23b"
}, { }, {
"dbname": "openEuler-20.03-LTS", "dbname": "mainline",
"downloadURL": null, "downloadURL": null,
"license": null, "license": null,
"maintainer": null, "maintainer": null,
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"sourceURL": null, "sourceURL": null,
"version": "0.0.2" "version": "0.0.2"
}, { }, {
"dbname": "openEuler-20.03-LTS", "dbname": "mainline",
"downloadURL": null, "downloadURL": null,
"license": null, "license": null,
"maintainer": null, "maintainer": null,
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"sourceURL": null, "sourceURL": null,
"version": "0.1" "version": "0.1"
}, { }, {
"dbname": "openEuler-20.03-LTS", "dbname": "mainline",
"downloadURL": null, "downloadURL": null,
"license": null, "license": null,
"maintainer": null, "maintainer": null,
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"sourceURL": null, "sourceURL": null,
"version": "0.11" "version": "0.11"
}, { }, {
"dbname": "openEuler-20.04-LTS", "dbname": "fedora30",
"downloadURL": null, "downloadURL": null,
"license": "GPLv2+ and BSD and MIT and IBM", "license": "GPLv2+ and BSD and MIT and IBM",
"maintainer": null, "maintainer": null,
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
"sourceURL": "http://play0ad.com", "sourceURL": "http://play0ad.com",
"version": "0.0.23b" "version": "0.0.23b"
}, { }, {
"dbname": "openEuler-20.04-LTS", "dbname": "fedora30",
"downloadURL": null, "downloadURL": null,
"license": null, "license": null,
"maintainer": null, "maintainer": null,
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
"sourceURL": null, "sourceURL": null,
"version": "0.0.3" "version": "0.0.3"
}, { }, {
"dbname": "openEuler-20.04-LTS", "dbname": "fedora30",
"downloadURL": null, "downloadURL": null,
"license": null, "license": null,
"maintainer": null, "maintainer": null,
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
"sourceURL": null, "sourceURL": null,
"version": "0.1" "version": "0.1"
}, { }, {
"dbname": "openEuler-20.04-LTS", "dbname": "fedora30",
"downloadURL": null, "downloadURL": null,
"license": null, "license": null,
"maintainer": null, "maintainer": null,
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
"sourceURL": null, "sourceURL": null,
"version": "0.12" "version": "0.12"
}, { }, {
"dbname": "openEuler-20.04-LTS", "dbname": "fedora30",
"downloadURL": null, "downloadURL": null,
"license": null, "license": null,
"maintainer": null, "maintainer": null,
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
"sourceURL": null, "sourceURL": null,
"version": "0.4" "version": "0.4"
}, { }, {
"dbname": "openEuler-20.04-LTS", "dbname": "fedora30",
"downloadURL": null, "downloadURL": null,
"license": null, "license": null,
"maintainer": null, "maintainer": null,
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"A1": [ "A1": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
"A2": [ "A2": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A1", "A1",
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
"B1": [ "B1": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A", "A",
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
"B2": [ "B2": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"C", "C",
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
"C1": [ "C1": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A", "A",
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
"D1": [ "D1": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -108,15 +108,19 @@ ...@@ -108,15 +108,19 @@
}, },
"source_dicts": { "source_dicts": {
"A": [ "A": [
"openEuler-20.03-LTS", "mainline",
"0.0.23b" "0.0.23b"
], ],
"B": [
"mainline",
"0.0.2"
],
"C": [ "C": [
"openEuler-20.03-LTS", "mainline",
"0.1" "0.1"
], ],
"D": [ "D": [
"openEuler-20.03-LTS", "mainline",
"0.11" "0.11"
] ]
} }
...@@ -136,7 +140,7 @@ ...@@ -136,7 +140,7 @@
"A1": [ "A1": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"D1", "D1",
...@@ -155,7 +159,7 @@ ...@@ -155,7 +159,7 @@
"A2": [ "A2": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"C1", "C1",
...@@ -174,7 +178,7 @@ ...@@ -174,7 +178,7 @@
"B1": [ "B1": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A", "A",
...@@ -189,7 +193,7 @@ ...@@ -189,7 +193,7 @@
"B2": [ "B2": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"C", "C",
...@@ -200,7 +204,7 @@ ...@@ -200,7 +204,7 @@
"C1": [ "C1": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -223,7 +227,7 @@ ...@@ -223,7 +227,7 @@
"C2": [ "C2": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -234,7 +238,7 @@ ...@@ -234,7 +238,7 @@
"D1": [ "D1": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -245,15 +249,19 @@ ...@@ -245,15 +249,19 @@
}, },
"source_dicts": { "source_dicts": {
"A": [ "A": [
"openEuler-20.03-LTS", "mainline",
"0.0.23b" "0.0.23b"
], ],
"B": [
"mainline",
"0.0.2"
],
"C": [ "C": [
"openEuler-20.03-LTS", "mainline",
"0.1" "0.1"
], ],
"D": [ "D": [
"openEuler-20.03-LTS", "mainline",
"0.11" "0.11"
] ]
} }
...@@ -274,7 +282,7 @@ ...@@ -274,7 +282,7 @@
"A1": [ "A1": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"D1", "D1",
...@@ -293,7 +301,7 @@ ...@@ -293,7 +301,7 @@
"A2": [ "A2": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -316,7 +324,7 @@ ...@@ -316,7 +324,7 @@
"B1": [ "B1": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A", "A",
...@@ -331,7 +339,7 @@ ...@@ -331,7 +339,7 @@
"B2": [ "B2": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"C", "C",
...@@ -342,7 +350,7 @@ ...@@ -342,7 +350,7 @@
"C1": [ "C1": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -361,7 +369,7 @@ ...@@ -361,7 +369,7 @@
"D1": [ "D1": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -376,7 +384,7 @@ ...@@ -376,7 +384,7 @@
"C2": [ "C2": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"C", "C",
...@@ -387,7 +395,7 @@ ...@@ -387,7 +395,7 @@
"D2": [ "D2": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"D", "D",
...@@ -398,19 +406,19 @@ ...@@ -398,19 +406,19 @@
}, },
"source_dicts": { "source_dicts": {
"A": [ "A": [
"openEuler-20.03-LTS", "mainline",
"0.0.23b" "0.0.23b"
], ],
"B": [ "B": [
"openEuler-20.03-LTS", "mainline",
"0.0.2" "0.0.2"
], ],
"C": [ "C": [
"openEuler-20.03-LTS", "mainline",
"0.1" "0.1"
], ],
"D": [ "D": [
"openEuler-20.03-LTS", "mainline",
"0.11" "0.11"
] ]
} }
...@@ -432,7 +440,7 @@ ...@@ -432,7 +440,7 @@
"A1": [ "A1": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -455,7 +463,7 @@ ...@@ -455,7 +463,7 @@
"A2": [ "A2": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -478,7 +486,7 @@ ...@@ -478,7 +486,7 @@
"B1": [ "B1": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A", "A",
...@@ -493,7 +501,7 @@ ...@@ -493,7 +501,7 @@
"B2": [ "B2": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"C", "C",
...@@ -504,7 +512,7 @@ ...@@ -504,7 +512,7 @@
"C1": [ "C1": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -523,7 +531,7 @@ ...@@ -523,7 +531,7 @@
"D1": [ "D1": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -538,7 +546,7 @@ ...@@ -538,7 +546,7 @@
"C2": [ "C2": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"C", "C",
...@@ -549,7 +557,7 @@ ...@@ -549,7 +557,7 @@
"D2": [ "D2": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"D", "D",
...@@ -560,19 +568,19 @@ ...@@ -560,19 +568,19 @@
}, },
"source_dicts": { "source_dicts": {
"A": [ "A": [
"openEuler-20.03-LTS", "mainline",
"0.0.23b" "0.0.23b"
], ],
"B": [ "B": [
"openEuler-20.03-LTS", "mainline",
"0.0.2" "0.0.2"
], ],
"C": [ "C": [
"openEuler-20.03-LTS", "mainline",
"0.1" "0.1"
], ],
"D": [ "D": [
"openEuler-20.03-LTS", "mainline",
"0.11" "0.11"
] ]
} }
...@@ -594,7 +602,7 @@ ...@@ -594,7 +602,7 @@
"A1": [ "A1": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -621,7 +629,7 @@ ...@@ -621,7 +629,7 @@
"A2": [ "A2": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -644,7 +652,7 @@ ...@@ -644,7 +652,7 @@
"B1": [ "B1": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A", "A",
...@@ -659,7 +667,7 @@ ...@@ -659,7 +667,7 @@
"B2": [ "B2": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"C", "C",
...@@ -670,7 +678,7 @@ ...@@ -670,7 +678,7 @@
"C1": [ "C1": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -693,7 +701,7 @@ ...@@ -693,7 +701,7 @@
"D1": [ "D1": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -708,7 +716,7 @@ ...@@ -708,7 +716,7 @@
"C2": [ "C2": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"C", "C",
...@@ -719,7 +727,7 @@ ...@@ -719,7 +727,7 @@
"D2": [ "D2": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"D", "D",
...@@ -730,19 +738,19 @@ ...@@ -730,19 +738,19 @@
}, },
"source_dicts": { "source_dicts": {
"A": [ "A": [
"openEuler-20.03-LTS", "mainline",
"0.0.23b" "0.0.23b"
], ],
"B": [ "B": [
"openEuler-20.03-LTS", "mainline",
"0.0.2" "0.0.2"
], ],
"C": [ "C": [
"openEuler-20.03-LTS", "mainline",
"0.1" "0.1"
], ],
"D": [ "D": [
"openEuler-20.03-LTS", "mainline",
"0.11" "0.11"
] ]
} }
...@@ -763,7 +771,7 @@ ...@@ -763,7 +771,7 @@
"A1": [ "A1": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"D1", "D1",
...@@ -786,7 +794,7 @@ ...@@ -786,7 +794,7 @@
"A2": [ "A2": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -809,7 +817,7 @@ ...@@ -809,7 +817,7 @@
"B1": [ "B1": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A", "A",
...@@ -824,7 +832,7 @@ ...@@ -824,7 +832,7 @@
"B2": [ "B2": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"C", "C",
...@@ -835,7 +843,7 @@ ...@@ -835,7 +843,7 @@
"C1": [ "C1": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -858,7 +866,7 @@ ...@@ -858,7 +866,7 @@
"D1": [ "D1": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -869,19 +877,19 @@ ...@@ -869,19 +877,19 @@
}, },
"source_dicts": { "source_dicts": {
"A": [ "A": [
"openEuler-20.03-LTS", "mainline",
"0.0.23b" "0.0.23b"
], ],
"B": [ "B": [
"openEuler-20.03-LTS", "mainline",
"0.0.2" "0.0.2"
], ],
"C": [ "C": [
"openEuler-20.03-LTS", "mainline",
"0.1" "0.1"
], ],
"D": [ "D": [
"openEuler-20.03-LTS", "mainline",
"0.11" "0.11"
] ]
} }
...@@ -903,7 +911,7 @@ ...@@ -903,7 +911,7 @@
"A1": [ "A1": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -930,7 +938,7 @@ ...@@ -930,7 +938,7 @@
"A2": [ "A2": [
"A", "A",
"0.0.23b", "0.0.23b",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"root", "root",
...@@ -953,7 +961,7 @@ ...@@ -953,7 +961,7 @@
"B1": [ "B1": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A", "A",
...@@ -968,7 +976,7 @@ ...@@ -968,7 +976,7 @@
"B2": [ "B2": [
"B", "B",
"0.0.2", "0.0.2",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"C", "C",
...@@ -979,7 +987,7 @@ ...@@ -979,7 +987,7 @@
"C1": [ "C1": [
"C", "C",
"0.1", "0.1",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -1002,7 +1010,7 @@ ...@@ -1002,7 +1010,7 @@
"D1": [ "D1": [
"D", "D",
"0.11", "0.11",
"openEuler-20.03-LTS", "mainline",
[ [
[ [
"A2", "A2",
...@@ -1013,19 +1021,19 @@ ...@@ -1013,19 +1021,19 @@
}, },
"source_dicts": { "source_dicts": {
"A": [ "A": [
"openEuler-20.03-LTS", "mainline",
"0.0.23b" "0.0.23b"
], ],
"B": [ "B": [
"openEuler-20.03-LTS", "mainline",
"0.0.2" "0.0.2"
], ],
"C": [ "C": [
"openEuler-20.03-LTS", "mainline",
"0.1" "0.1"
], ],
"D": [ "D": [
"openEuler-20.03-LTS", "mainline",
"0.11" "0.11"
] ]
} }
......
- database_name: openEuler-20.03-LTS - database_name: mainline
priority: 1 priority: 1
status: enable status: enable
- database_name: openEuler-20.04-LTS - database_name: fedora30
priority: 2 priority: 2
status: enable status: enable
[SYSTEM] [SYSTEM]
init_conf_path = C:\Users\14500\Desktop\workspace\openEuler_pkgmnt\openEuler_Advisor\packageship\test\common_files\conf.yaml init_conf_path =
debug = false debug = false
write_port = 8080 write_port = 8080
query_port = 8090 query_port = 8090
...@@ -7,10 +7,10 @@ write_ip_addr = 127.0.0.1 ...@@ -7,10 +7,10 @@ write_ip_addr = 127.0.0.1
query_ip_addr = 127.0.0.1 query_ip_addr = 127.0.0.1
[DATABASE] [DATABASE]
user_name = root user_name =
password = 123456 password =
host = localhost host =
port = 3306 port =
database = database =
dbtype = sqlite dbtype = sqlite
...@@ -19,6 +19,8 @@ log_level = INFO ...@@ -19,6 +19,8 @@ log_level = INFO
log_name = log_info.log log_name = log_info.log
[UWSGI] [UWSGI]
daemonize = /var/run/pkgship/uwsgi.log daemonize = /var/log/uwsgi.log
buffer-size = 65536 buffer-size = 65536
http-timeout = 600
harakiri = 600
...@@ -8,13 +8,13 @@ import json ...@@ -8,13 +8,13 @@ import json
from test.base_code.read_data_base import ReadTestBase from test.base_code.read_data_base import ReadTestBase
from test.base_code.common_test_code import compare_two_values, get_correct_json_by_filename from test.base_code.common_test_code import compare_two_values, get_correct_json_by_filename
from packageship.application.apps.package.function.constants import ResponseCode from packageship.application.apps.package.function.constants import ResponseCode
from packageship.application.apps.package.function.searchdb import db_priority
class TestBeDepend(ReadTestBase): class TestBeDepend(ReadTestBase):
""" """
The dependencies of the package are tested The dependencies of the package are tested
""" """
db_name = db_priority()[0]
def test_lack_parameter(self): def test_lack_parameter(self):
""" """
Less transmission is always parameter transmission Less transmission is always parameter transmission
...@@ -98,7 +98,7 @@ class TestBeDepend(ReadTestBase): ...@@ -98,7 +98,7 @@ class TestBeDepend(ReadTestBase):
# Only the dbname # Only the dbname
resp = self.client.post("/packages/findBeDepend", resp = self.client.post("/packages/findBeDepend",
data=json.dumps({ data=json.dumps({
"dbname": "openEuler-20.03-LTS", "dbname": f"{self.db_name}",
}), }),
content_type="application/json") content_type="application/json")
...@@ -125,7 +125,7 @@ class TestBeDepend(ReadTestBase): ...@@ -125,7 +125,7 @@ class TestBeDepend(ReadTestBase):
resp = self.client.post("/packages/findBeDepend", resp = self.client.post("/packages/findBeDepend",
data=json.dumps({ data=json.dumps({
"packagename": "A", "packagename": "A",
"dbname": "openEuler-20.03-LTS" "dbname": f"{self.db_name}"
}), }),
content_type="application/json") content_type="application/json")
...@@ -176,7 +176,7 @@ class TestBeDepend(ReadTestBase): ...@@ -176,7 +176,7 @@ class TestBeDepend(ReadTestBase):
# Don't preach packagename # Don't preach packagename
resp = self.client.post("/packages/findBeDepend", resp = self.client.post("/packages/findBeDepend",
data=json.dumps({ data=json.dumps({
"dbname": "openEuler-20.03-LTS", "dbname": f"{self.db_name}",
"withsubpack": "0" "withsubpack": "0"
}), }),
content_type="application/json") content_type="application/json")
...@@ -204,7 +204,7 @@ class TestBeDepend(ReadTestBase): ...@@ -204,7 +204,7 @@ class TestBeDepend(ReadTestBase):
resp = self.client.post("/packages/findBeDepend", resp = self.client.post("/packages/findBeDepend",
data=json.dumps({ data=json.dumps({
"packagename": "A", "packagename": "A",
"dbname": "openEuler-20.03-LTS", "dbname": f"{self.db_name}",
"withsubpack": "0" "withsubpack": "0"
}), }),
content_type="application/json") content_type="application/json")
...@@ -230,7 +230,7 @@ class TestBeDepend(ReadTestBase): ...@@ -230,7 +230,7 @@ class TestBeDepend(ReadTestBase):
resp = self.client.post("/packages/findBeDepend", resp = self.client.post("/packages/findBeDepend",
data=json.dumps({ data=json.dumps({
"packagename": "A", "packagename": "A",
"dbname": "openEuler-20.03-LTS", "dbname": f"{self.db_name}",
"withsubpack": "1" "withsubpack": "1"
}), }),
content_type="application/json") content_type="application/json")
...@@ -261,7 +261,7 @@ class TestBeDepend(ReadTestBase): ...@@ -261,7 +261,7 @@ class TestBeDepend(ReadTestBase):
resp = self.client.post("/packages/findBeDepend", resp = self.client.post("/packages/findBeDepend",
data=json.dumps({ data=json.dumps({
"packagename": "詹姆斯", "packagename": "詹姆斯",
"dbname": "openEuler-20.03-LTS", "dbname": f"{self.db_name}",
"withsubpack": "0" "withsubpack": "0"
}), }),
content_type="application/json") content_type="application/json")
...@@ -316,7 +316,7 @@ class TestBeDepend(ReadTestBase): ...@@ -316,7 +316,7 @@ class TestBeDepend(ReadTestBase):
resp = self.client.post("/packages/findBeDepend", resp = self.client.post("/packages/findBeDepend",
data=json.dumps({ data=json.dumps({
"packagename": "CUnit", "packagename": "CUnit",
"dbname": "openEuler-20.03-LTS", "dbname": f"{self.db_name}",
"withsubpack": "3" "withsubpack": "3"
}), }),
content_type="application/json") content_type="application/json")
......
...@@ -280,7 +280,10 @@ class TestSelfDepend(ReadTestBase): ...@@ -280,7 +280,10 @@ class TestSelfDepend(ReadTestBase):
data=json.dumps(input_value), data=json.dumps(input_value),
content_type="application/json") content_type="application/json")
output_for_input = correct_data["output"] output_for_input = correct_data["output"]
from pprint import pprint
resp_dict = json.loads(resp.data) resp_dict = json.loads(resp.data)
self.assertTrue(compare_two_values(output_for_input, resp_dict), self.assertTrue(compare_two_values(output_for_input, resp_dict),
msg="The answer is not correct") msg="The answer is not correct")
......
...@@ -71,7 +71,7 @@ class TestDeleteRepodatas(OperateTestBase): ...@@ -71,7 +71,7 @@ class TestDeleteRepodatas(OperateTestBase):
try: try:
shutil.copyfile(system_config.DATABASE_FILE_INFO, system_config.DATABASE_FILE_INFO + '.bak') shutil.copyfile(system_config.DATABASE_FILE_INFO, system_config.DATABASE_FILE_INFO + '.bak')
shutil.copytree(system_config.DATABASE_FOLDER_PATH, system_config.DATABASE_FOLDER_PATH + '.bak') shutil.copytree(system_config.DATABASE_FOLDER_PATH, system_config.DATABASE_FOLDER_PATH + '.bak')
resp = self.client.delete("/repodatas?dbName=openEuler-20.04-LTS") resp = self.client.delete("/repodatas?dbName=fedora30")
resp_dict = json.loads(resp.data) resp_dict = json.loads(resp.data)
self.assertIn("code", resp_dict, msg="Error in data format return") self.assertIn("code", resp_dict, msg="Error in data format return")
......
...@@ -10,19 +10,18 @@ import unittest ...@@ -10,19 +10,18 @@ import unittest
import json import json
from packageship.application.apps.package.function.constants import ResponseCode from packageship.application.apps.package.function.constants import ResponseCode
from packageship.application.apps.package.function.searchdb import db_priority
class TestGetSinglePack(ReadTestBase): class TestGetSinglePack(ReadTestBase):
""" """
Single package test case Single package test case
""" """
db_name = db_priority()[-1]
def test_error_sourcename(self): def test_error_sourcename(self):
"""sourceName is none or err""" """sourceName is none or err"""
resp = self.client.get("packages/findByPackName?dbName=openeuler-20.03-lts") resp = self.client.get(f"packages/packageInfo?dbName={self.db_name}")
resp_dict = json.loads(resp.data) resp_dict = json.loads(resp.data)
self.assertIn("code", resp_dict, msg="Error in data format return") self.assertIn("code", resp_dict, msg="Error in data format return")
self.assertEqual(ResponseCode.PARAM_ERROR, self.assertEqual(ResponseCode.PARAM_ERROR,
resp_dict.get("code"), resp_dict.get("code"),
...@@ -41,7 +40,7 @@ class TestGetSinglePack(ReadTestBase): ...@@ -41,7 +40,7 @@ class TestGetSinglePack(ReadTestBase):
msg="Error in data information return") msg="Error in data information return")
resp = self.client.get( resp = self.client.get(
"packages/findByPackName?sourceName=&dbName=openEuler-20.03-LTS") f"packages/packageInfo?sourceName=&dbName={self.db_name}")
resp_dict = json.loads(resp.data) resp_dict = json.loads(resp.data)
self.assertIn("code", resp_dict, msg="Error in data format return") self.assertIn("code", resp_dict, msg="Error in data format return")
...@@ -62,7 +61,7 @@ class TestGetSinglePack(ReadTestBase): ...@@ -62,7 +61,7 @@ class TestGetSinglePack(ReadTestBase):
msg="Error in data information return") msg="Error in data information return")
resp = self.client.get( resp = self.client.get(
"packages/findByPackName?sourceName=test&dbName=for") "packages/packageInfo?sourceName=test&dbName=for")
resp_dict = json.loads(resp.data) resp_dict = json.loads(resp.data)
self.assertIn("code", resp_dict, msg="Error in data format return") self.assertIn("code", resp_dict, msg="Error in data format return")
...@@ -85,7 +84,7 @@ class TestGetSinglePack(ReadTestBase): ...@@ -85,7 +84,7 @@ class TestGetSinglePack(ReadTestBase):
def test_true_dbname(self): def test_true_dbname(self):
"""dbName is null or err""" """dbName is null or err"""
resp = self.client.get("packages/findByPackName?sourceName=A") resp = self.client.get("packages/packageInfo?sourceName=A")
resp_dict = json.loads(resp.data) resp_dict = json.loads(resp.data)
self.assertIn("code", resp_dict, msg="Error in data format return") self.assertIn("code", resp_dict, msg="Error in data format return")
...@@ -105,10 +104,10 @@ class TestGetSinglePack(ReadTestBase): ...@@ -105,10 +104,10 @@ class TestGetSinglePack(ReadTestBase):
correct_list = get_correct_json_by_filename("get_single_package") correct_list = get_correct_json_by_filename("get_single_package")
self.assertNotEqual([], correct_list, msg="Error reading JSON file") self.assertNotEqual([], correct_list, msg="Error reading JSON file")
input_value = correct_list[0]["url"]
resp = self.client.get( resp = self.client.get(
"/packages/findByPackName?sourceName=A&dbName=openEuler-20.03-LTS") f"{input_value}")
resp_dict = json.loads(resp.data) resp_dict = json.loads(resp.data)
self.assertIn("code", resp_dict, msg="Error in data format return") self.assertIn("code", resp_dict, msg="Error in data format return")
self.assertEqual(ResponseCode.SUCCESS, self.assertEqual(ResponseCode.SUCCESS,
resp_dict.get("code"), resp_dict.get("code"),
...@@ -123,13 +122,13 @@ class TestGetSinglePack(ReadTestBase): ...@@ -123,13 +122,13 @@ class TestGetSinglePack(ReadTestBase):
self.assertTrue( self.assertTrue(
compare_two_values( compare_two_values(
resp_dict.get("data"), resp_dict.get("data"),
correct_list), correct_list[0]['data']),
msg="Error in data information return") msg="Error in data information return")
def test_wrong_dbname(self): def test_wrong_dbname(self):
"""test_wrong_dbname""" """test_wrong_dbname"""
resp = self.client.get( resp = self.client.get(
"/packages/findByPackName?sourceName=CUnit&dbName=openEuler-20.03-lts") "/packages/packageInfo?sourceName=A&dbName=open")
resp_dict = json.loads(resp.data) resp_dict = json.loads(resp.data)
self.assertIn("code", resp_dict, msg="Error in data format return") self.assertIn("code", resp_dict, msg="Error in data format return")
......
...@@ -6,15 +6,15 @@ import unittest ...@@ -6,15 +6,15 @@ import unittest
import json import json
from packageship.application.apps.package.function.constants import ResponseCode from packageship.application.apps.package.function.constants import ResponseCode
from packageship.application.apps.package.function.searchdb import db_priority
class TestUpdatePackage(OperateTestBase): class TestUpdatePackage(OperateTestBase):
"""TestUpdatePackage""" """TestUpdatePackage"""
db_name = db_priority()[0]
def test_empty_dbname(self): def test_empty_dbname(self):
"""Parameter error""" """Parameter error"""
resp = self.client.put("/packages/findByPackName", resp = self.client.put("/packages/packageInfo",
data=json.dumps({"dbName": "", data=json.dumps({"dbName": "",
"sourceName": "xx", "sourceName": "xx",
"maintainer": "", "maintainer": "",
...@@ -41,8 +41,8 @@ class TestUpdatePackage(OperateTestBase): ...@@ -41,8 +41,8 @@ class TestUpdatePackage(OperateTestBase):
msg="Error in data information return") msg="Error in data information return")
# wrong dbname # wrong dbname
resp = self.client.put("/packages/findByPackName", resp = self.client.put("/packages/packageInfo",
data=json.dumps({"dbName": "xx", data=json.dumps({"dbName": "xhhz",
"sourceName": "xx", "sourceName": "xx",
"maintainer": "", "maintainer": "",
"maintainlevel": "1"}), "maintainlevel": "1"}),
...@@ -70,8 +70,8 @@ class TestUpdatePackage(OperateTestBase): ...@@ -70,8 +70,8 @@ class TestUpdatePackage(OperateTestBase):
def test_empty_sourcename(self): def test_empty_sourcename(self):
"""Parameter error""" """Parameter error"""
resp = self.client.put("/packages/findByPackName", resp = self.client.put("/packages/packageInfo",
data=json.dumps({"dbName": "openEuler-20.04-LTS", data=json.dumps({"dbName": f"{self.db_name}",
"sourceName": "xx", "sourceName": "xx",
"maintainer": "1"}), "maintainer": "1"}),
content_type="application/json") content_type="application/json")
...@@ -95,8 +95,8 @@ class TestUpdatePackage(OperateTestBase): ...@@ -95,8 +95,8 @@ class TestUpdatePackage(OperateTestBase):
resp_dict.get("data"), resp_dict.get("data"),
msg="Error in data information return") msg="Error in data information return")
# miss maintainer maintainlevel # miss maintainer maintainlevel
resp = self.client.put("/packages/findByPackName", resp = self.client.put("/packages/packageInfo",
data=json.dumps({"dbName": "openEuler-20.04-LTS", data=json.dumps({"dbName": f"{self.db_name}",
"sourceName": "xx"}), "sourceName": "xx"}),
content_type="application/json") content_type="application/json")
resp_dict = json.loads(resp.data) resp_dict = json.loads(resp.data)
...@@ -123,8 +123,8 @@ class TestUpdatePackage(OperateTestBase): ...@@ -123,8 +123,8 @@ class TestUpdatePackage(OperateTestBase):
""" """
Returns: Returns:
""" """
resp = self.client.put("/packages/findByPackName", resp = self.client.put("/packages/packageInfo",
data=json.dumps({"dbName": "openEuler-20.04-LTS", data=json.dumps({"dbName": f"{self.db_name}",
"sourceName": "A", "sourceName": "A",
"maintainer": "x", "maintainer": "x",
"maintainlevel": "1"}), "maintainlevel": "1"}),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册