#[tokio::test]
#[ignore = "requires a live Vault (set VAULT_TEST=1 and run with --ignored)"]
async fn resolves_vault_secret_end_to_end() {
if std::env::var("VAULT_TEST").as_deref() != Ok("1") {
return;
}
use faucet_cli::config::PipelineConfig;
let yaml = r#"
version: 1
pipeline:
source: { type: rest, config: { base_url: https://x, auth: { type: bearer, config: { token: "${vault:secret/data/faucet/api#token}" } } } }
sink: { type: jsonl, config: { path: ./o.jsonl } }
"#;
let dir = tempfile::tempdir().unwrap();
let path = dir.path().join("p.yaml");
std::fs::write(&path, yaml).unwrap();
let cfg = PipelineConfig::from_path_async(&path).await.unwrap();
let token = &cfg.pipeline.source.unwrap().config["auth"]["config"]["token"];
assert_eq!(token, "live-token-value");
}