`tests/env_approval.rs`: a `[project.environments]` gating `production` → `pic apply --env production` refused (names --approve); `--yes` alone does not bypass; `--approve production` applies; an un-gated `staging` applies freely. Design doc §3 records M3 shipped and the §6/§3 group-tree Tier 1 (M1 create · M2 divergence/reparent · M3 per-env approval) COMPLETE. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
59 lines
1.2 KiB
Rust
59 lines
1.2 KiB
Rust
//! Integration-test binary for the `pic` CLI.
|
|
//!
|
|
//! Every `#[test]` in this binary routes through `common::fixture()`, a
|
|
//! `LazyLock` that spawns picloud once on a private port and reuses it
|
|
//! across all journey modules. Mirrors the dashboard Playwright suite,
|
|
//! which spins backend + Vite up once for 63 specs.
|
|
//!
|
|
//! Gated on `DATABASE_URL`. To run:
|
|
//!
|
|
//! docker compose up -d postgres
|
|
//! DATABASE_URL=postgres://picloud:picloud@127.0.0.1:15432/picloud \
|
|
//! cargo test -p picloud-cli --test cli -- --include-ignored
|
|
|
|
mod common;
|
|
|
|
mod admins;
|
|
mod api_keys;
|
|
mod apply;
|
|
mod apply_ownership;
|
|
mod apps;
|
|
mod auth;
|
|
mod collections;
|
|
mod config;
|
|
mod dead_letters;
|
|
mod email_queue;
|
|
mod enabled;
|
|
mod env_approval;
|
|
mod env_overlay;
|
|
mod extension_points;
|
|
mod group_create;
|
|
mod group_modules;
|
|
mod group_routes;
|
|
mod group_scripts;
|
|
mod group_secrets;
|
|
mod group_triggers;
|
|
mod groups;
|
|
mod init;
|
|
mod invoke;
|
|
mod logs;
|
|
mod output;
|
|
mod plan;
|
|
mod prune;
|
|
mod pull;
|
|
mod roles;
|
|
mod routes;
|
|
mod scripts;
|
|
mod sealed;
|
|
mod secrets;
|
|
mod shared_queues;
|
|
mod shared_topics;
|
|
mod shared_triggers;
|
|
mod staleness;
|
|
mod stateful_templates;
|
|
mod structural_divergence;
|
|
mod suppress;
|
|
mod tree;
|
|
mod triggers;
|
|
mod vars;
|