#[tokio::test]
#[ignore = "requires LocalStack (set AWS_SM_TEST=1 and run with --ignored)"]
async fn resolves_aws_secret_field_end_to_end() {
if std::env::var("AWS_SM_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: "${aws-sm:prod/faucet#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, None).await.unwrap();
let token = &cfg.pipeline.source.unwrap().config["auth"]["config"]["token"];
assert_eq!(token, "aws-live-token");
}