-
Notifications
You must be signed in to change notification settings - Fork 162
Expand file tree
/
Copy path.env.test.example
More file actions
112 lines (103 loc) · 4.95 KB
/
Copy path.env.test.example
File metadata and controls
112 lines (103 loc) · 4.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# =============================================================
# Libra L2 / L3 test credentials
# =============================================================
# Copy to .env.test (gitignored) and fill in your values, then run:
#
# source .env.test && cargo test --all
#
# The `export` prefix on each line is required so that variables
# propagate from the shell into the cargo test child process —
# without it, `source .env.test` only sets local shell variables
# that the cargo subprocess cannot see, and L2/L3 tests skip silently.
# =============================================================
# L2 — Network tests (GitHub)
# =============================================================
# Create a personal access token at https://github.com/settings/tokens
# Required scope: public_repo (only public repos — avoids accidental deletion of private repos)
# The test creates a temporary repo named "libra-test-<random>" under this namespace,
# runs all network tests against it, and deletes it on completion.
export LIBRA_TEST_GITHUB_TOKEN=
export LIBRA_TEST_GITHUB_NAMESPACE=
# =============================================================
# L3 — AI tests
# =============================================================
# Get your key at https://platform.deepseek.com/api_keys
# Tests use the deepseek-v4-flash model; setting this key alone
# activates the L3 AI gate (no separate LIBRA_AI_LIVE_* needed).
#
# Note: DeepSeek does NOT honor a DEEPSEEK_BASE_URL env var. The
# default base URL is baked into the client; override only via the
# CLI flag `--api-base <url>` (which sets ProviderBuildOptions::api_base
# and routes through `deepseek::Client::with_base_url`).
export DEEPSEEK_API_KEY=
# Required for Kimi / Moonshot live provider tests.
# Libra's Kimi provider reads MOONSHOT_API_KEY and defaults to
# https://api.moonshot.cn/v1 unless MOONSHOT_BASE_URL is set.
export MOONSHOT_API_KEY=
# Override only when running against a non-default Moonshot endpoint.
# export MOONSHOT_BASE_URL=https://api.moonshot.cn/v1
# Required for Ollama live-gate test.
# export LIBRA_AI_LIVE_OLLAMA=
# export OLLAMA_HOST=http://127.0.0.1:11434
# =============================================================
# L3 — Cloud feature tests (D1 + R2)
# =============================================================
# Used by: cloud sync/restore workflow, D1 CRUD, R2 object storage
# Cloudflare Dashboard → Workers & Pages → Overview → Account ID
export LIBRA_D1_ACCOUNT_ID=
# Cloudflare Dashboard → API Tokens → Create Token
export LIBRA_D1_API_TOKEN=
# Cloudflare Dashboard → Workers & Pages → D1 → your database
export LIBRA_D1_DATABASE_ID=
# Cloudflare Dashboard → R2 → Bucket → Settings → S3 API
export LIBRA_STORAGE_ENDPOINT=
export LIBRA_STORAGE_BUCKET=
export LIBRA_STORAGE_ACCESS_KEY=
export LIBRA_STORAGE_SECRET_KEY=
export LIBRA_STORAGE_REGION=auto
# Optional: tiered-storage backend type, `s3` or `r2`. Live tests default
# to `s3` when unset (R2 is S3-compatible); set explicitly only to exercise
# the `r2` code path.
# export LIBRA_STORAGE_TYPE=s3
# Optional deploy-smoke portion of:
# LIBRA_ENABLE_TEST_LIVE_CLOUD=1 cargo test --features test-live-cloud publish_live -- --test-threads=1
# Point this at a deployed publish Worker using the same D1/R2 bindings.
# The live gate creates a fresh slug automatically and derives clone_domain
# from this origin host unless the optional overrides are set.
export LIBRA_PUBLISH_LIVE_WORKER_ORIGIN=
# export LIBRA_PUBLISH_LIVE_CLONE_DOMAIN=
# export LIBRA_PUBLISH_LIVE_SLUG=
# export LIBRA_PUBLISH_LIVE_FILE_PATH=
# Explicit opt-in for the publish_live deploy-smoke gate. Without this,
# the gate is silently skipped even when the LIBRA_PUBLISH_LIVE_* values
# above are populated, so an accidental .env.test edit cannot start
# hitting a real Worker.
# export LIBRA_ENABLE_TEST_LIVE_CLOUD=1
# Optional second Cloudflare credential used by some live-cloud helpers
# that need a global API token (separate from the scoped D1 token above).
# Most local development can leave this commented out.
# export CLOUDFLARE_API_TOKEN=
# =============================================================
# L3 — S3 storage object tests
# =============================================================
# Tests S3 protocol features: PUT/GET/DELETE, multipart upload,
# list with prefix, tiered storage, error handling, etc.
#
# Uses a SEPARATE S3-compatible endpoint (can be different from R2 above).
# Supports: AWS S3, MinIO, or any S3-compatible service.
#
# --- AWS S3 ---
# export LIBRA_TEST_S3_ENDPOINT=https://s3.<region>.amazonaws.com
#
# --- Local MinIO (for offline development) ---
# docker run -p 9000:9000 minio/minio server /data
# export LIBRA_TEST_S3_ENDPOINT=http://127.0.0.1:9000
# export LIBRA_TEST_S3_ALLOW_HTTP=true
#
export LIBRA_TEST_S3_ENDPOINT=
export LIBRA_TEST_S3_BUCKET=
export LIBRA_TEST_S3_ACCESS_KEY=
export LIBRA_TEST_S3_SECRET_KEY=
export LIBRA_TEST_S3_REGION=
# Set to "true" when using HTTP endpoints (e.g. local MinIO)
# export LIBRA_TEST_S3_ALLOW_HTTP=true