Skip to content

Commit

Permalink
fix: 修复差量同步主机忽略内网IP变更场景 (closed TencentBlueKing#2504)
Browse files Browse the repository at this point in the history
  • Loading branch information
Huayeaaa committed Dec 5, 2024
1 parent 3083e1a commit 84e99ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/node_man/tests/test_views/test_job_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,14 @@ def setUp(self) -> None:
)
return super().setUp()

@patch("apps.node_man.periodic_tasks.sync_cmdb_host.client_v2", MockClient)
@patch("apps.node_man.handlers.job.JobHandler.create_subscription", Subscription.create_subscription)
@patch("apps.node_man.periodic_tasks.sync_cmdb_host.client_v2", MockClient)
def test_install(self):
data = copy.deepcopy(job.JOB_REINSTALL_REQUEST_PARAMS)
data["hosts"][0]["inner_ip"] = "2.1.2.52"

response = self.client.post(path="/api/job/install/", data=data)
print(1111111111111111111111111111111111111111111111111111)
print(response)
# 成功创建安装任务
self.assertEqual(response["result"], True)

0 comments on commit 84e99ae

Please sign in to comment.