Files
Nexus/tests/test_nginx_domain_detect.py
T
r 6859846b7c sync: 主项目全量同步(含 btpanel 一键登录回归修复与前端构建产物)
- bootstrap 失败恢复 SSH 临时登录回退
- ssh_bootstrap 真安装检测与 config 目录自愈
- axs Gitea 发布源切换为 https://axs.kuma1xn.vip
2026-07-08 23:52:40 +08:00

22 lines
653 B
Python

"""nginx domain detect command builder."""
import pytest
from server.utils.nginx_domain_detect import build_nginx_domain_detect_command
def test_build_nginx_domain_detect_command_includes_baota_scan():
cmd = build_nginx_domain_detect_command()
assert "/www/server/panel/vhost/nginx" in cmd
assert "_is_domain" in cmd
def test_build_nginx_domain_detect_command_quotes_target_hint():
cmd = build_nginx_domain_detect_command(target_hint="a;rm -rf")
assert "'a;rm -rf'" in cmd
def test_build_nginx_domain_detect_command_empty_hint():
cmd = build_nginx_domain_detect_command(target_hint="")
assert "TARGET_HINT=''" in cmd