Skip to content

Commit

Permalink
节点管理-免评审: 节点管理「管控区域」「agent版本」筛选能力优化 (closed TencentBlueKing#1752)
Browse files Browse the repository at this point in the history
  • Loading branch information
Huayeaaa committed Dec 27, 2023
1 parent b841c3e commit 90e7025
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/node_man/tests/test_handlers/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ def test_fetch_plugin_list_condition_no_permission(self, *args, **kwargs):
self.assertEqual(result[0], {"name": "IP", "id": "ip"})
self.assertEqual(result[1], {"name": "管控区域ID:IP", "id": "bk_cloud_ip"})

# self.assertEqual(len(result[4]["children"]), total_cloud_num)
self.assertEqual(
result[5],
{
Expand Down Expand Up @@ -262,7 +261,7 @@ def test_fetch_plugin_list_condition_no_permission(self, *args, **kwargs):
self.assertLessEqual(len(result[4]["children"]), 2)

# 验证传入没有的业务ID的情况
result = MetaHandler().filter_condition("plugin_host", params={"bk_biz_ids": [1, 2, 3]})
result = MetaHandler().filter_condition("plugin_host", params={"bk_biz_ids": [43225, 189731]})
self.assertEqual(len(result), 3)

@patch("apps.node_man.handlers.cmdb.client_v2", MockClient)
Expand Down Expand Up @@ -303,7 +302,8 @@ def test_fetch_plugin_version_condition(self):
self.assertLessEqual(len(result), 11)
# 验证传入没有的业务ID的情况
result = MetaHandler().fetch_plugin_version_condition(params={"bk_biz_ids": [1, 2, 3]})
self.assertLessEqual(len(result), 6)
# 无法预知线上GLOBAL_SETTINGS中HEAD_PLUGINS数量,故取一个较大的值
self.assertLessEqual(len(result), 30)

@override_settings(BKAPP_DEFAULT_SSH_PORT=22)
def test_global_settings__install_default_values(self):
Expand Down

0 comments on commit 90e7025

Please sign in to comment.