safety-eval-service-frontend/docs/test-reports/测试用例/setup-test-env.sh

20 lines
705 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#!/usr/bin/env bash
# 企业信息管理联调测试环境变量
# 用法: source scripts/setup-test-env.sh
export API_BASE="${API_BASE:-http://127.0.0.1:8095/safety-eval}"
export SAFETY_EVAL_API_HOST="${SAFETY_EVAL_API_HOST:-http://127.0.0.1:8095}"
# JetBrains 内置 Node系统 PATH 无 node 时使用)
if ! command -v node >/dev/null 2>&1; then
_JB_NODE="$HOME/Library/Application Support/JetBrains/IntelliJIdea2025.3/node/versions/24.16.0/bin/node"
if [[ -x "$_JB_NODE" ]]; then
export NODE="$_JB_NODE"
export PATH="$(dirname "$_JB_NODE"):$PATH"
fi
fi
echo "API_BASE=$API_BASE"
echo "SAFETY_EVAL_API_HOST=$SAFETY_EVAL_API_HOST"
echo "NODE=$(command -v node || echo '未找到')"