mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-15 23:46:30 +00:00
Merge pull request #4268 from jumpserver/dev_adminuser
fix(assets): 修复测试管理用户/系统用户资产可连接性问题
This commit is contained in:
commit
452ed2baf1
@ -85,7 +85,7 @@ def test_asset_user_connectivity_util(asset_user, task_name):
|
||||
raw, summary = test_user_connectivity(
|
||||
task_name=task_name, asset=asset_user.asset,
|
||||
username=asset_user.username, password=asset_user.password,
|
||||
private_key=asset_user.private_key
|
||||
private_key=asset_user.private_key_file
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warn("Failed run adhoc {}, {}".format(task_name, e))
|
||||
|
@ -31,7 +31,10 @@ def test_system_user_connectivity_util(system_user, assets, task_name):
|
||||
"""
|
||||
from ops.utils import update_or_create_ansible_task
|
||||
|
||||
hosts = clean_ansible_task_hosts(assets, system_user=system_user)
|
||||
# hosts = clean_ansible_task_hosts(assets, system_user=system_user)
|
||||
# TODO: 这里不传递系统用户,因为clean_ansible_task_hosts会通过system_user来判断是否可以推送,
|
||||
# 不符合测试可连接性逻辑, 后面需要优化此逻辑
|
||||
hosts = clean_ansible_task_hosts(assets)
|
||||
if not hosts:
|
||||
return {}
|
||||
platform_hosts_map = {}
|
||||
|
Binary file not shown.
@ -756,7 +756,7 @@ msgstr "定期测试管理账号可连接性: {}"
|
||||
|
||||
#: assets/tasks/admin_user_connectivity.py:67
|
||||
msgid "Test admin user connectivity: {}"
|
||||
msgstr "测试管理行号可连接性: {}"
|
||||
msgstr "测试管理帐号可连接性: {}"
|
||||
|
||||
#: assets/tasks/asset_connectivity.py:27
|
||||
msgid "Test assets connectivity"
|
||||
|
Loading…
Reference in New Issue
Block a user