-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.env.test.example
More file actions
31 lines (30 loc) · 1.59 KB
/
Copy path.env.test.example
File metadata and controls
31 lines (30 loc) · 1.59 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
# .env.test.example — Local dev DATABASE_URL for Postgres integration tests
#
# This file documents where DATABASE_URL comes from in each environment.
# It is NOT a fallback mechanism — DATABASE_URL must always be explicitly
# injected from the appropriate infrastructure layer.
#
# ─── Environment mapping ────────────────────────────────────────────────────
#
# Local dev → provisioned by `just v2-db-up` (Podman container)
# DATABASE_URL is set by `just v2-test-pg` from the justfile.
#
# CI → set as CI environment variable / secret.
# The database server is provisioned by CI infrastructure.
#
# Staging → DATABASE_URL from rbx-infra Ansible vault output.
# Never test against the production database.
#
# ─── Local dev usage ────────────────────────────────────────────────────────
#
# # Preferred (justfile handles DATABASE_URL automatically):
# just v2-db-up && just v2-test-pg
#
# # Manual (if you need to run the script directly):
# export DATABASE_URL=postgresql://robson:robson@localhost:5432/robson_v2
# bash v2/scripts/test-pg.sh
#
# WARNING: NEVER use a production DATABASE_URL.
# sqlx::test creates and drops temporary databases on the target server.
# Local dev credentials (Podman container started by `just v2-db-up`)
DATABASE_URL=postgresql://robson:robson@localhost:5432/robson_v2