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
// Integration tests run with #[ignore] so they don't pollute default
// `cargo test`. We allow panicking/printing constructs that the main
// crate forbids — these are tests, the lints aren't useful here.
//! Integration tests for `cirrus-metadata` against a real Salesforce
//! sandbox / dev / scratch org. All tests are `#[ignore]` so they
//! don't run with default `cargo test`. Run with:
//!
//! ```bash
//! cargo nextest run -p cirrus-metadata --run-ignored only \
//! -E 'binary(integration)' -- --test-threads=1
//! # or, with cargo's built-in runner:
//! cargo test -p cirrus-metadata --test integration -- --ignored --test-threads=1
//! ```
//!
//! Sequential (`--test-threads=1`) keeps the CRUD and file-based tests
//! from colliding on shared org state and saturating the Daily API
//! Request quota. Read-only smoke tests would be fine in parallel but
//! it's simpler to keep one rule for all of them.
//!
//! Configuration via `.env` at the repo root or shell environment —
//! the same env vars the `cirrus` and `cirrus-auth` crates consume.
//! See `tests/integration/common.rs` for the full contract.
//!
//! # Test layout
//!
//! - `common` — shared harness (env loading, client construction,
//! safety guards, cleanup helpers).
//! - `smoke` — read-only verifications: `describeMetadata`,
//! `listMetadata`, endpoint URL shape, retry-policy reuse.
//! - `crud` — CustomLabel create → read → update → delete cycle via
//! the SOAP CRUD operations.
//! - `file_based` — `deploy` + `wait_for_deploy` + `retrieve` +
//! `wait_for_retrieve` with a minimal CustomLabel-only package.