#!/usr/bin/env bash

set -euo pipefail

# 本验收只运行公共基础拥有的公开接缝；真实依赖连接信息沿用项目本地配置。
if [[ -f .env.local ]]; then
  set -a
  # shellcheck disable=SC1091
  source .env.local
  set +a
fi

GOCACHE="${GOCACHE:-/tmp/junhong-go-cache}" go test \
  ./pkg/idempotency \
  ./pkg/asynctask \
  ./pkg/logger \
  ./pkg/queue \
  ./internal/infrastructure/asynctask \
  ./internal/infrastructure/releasegate \
  ./internal/infrastructure/messaging/outbox \
  ./internal/query/outbox \
  ./internal/application/outbox \
  ./internal/infrastructure/systemconfig \
  ./internal/query/systemconfig \
  ./internal/application/systemconfig \
  ./internal/routes \
  -count=1
