diff options
| author | tv <tv@krebsco.de> | 2026-11-30 22:40:32 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-30 22:40:32 +0000 |
| commit | 8ffc4414e13ed3e81dfc2841149b9a745722fdb1 (patch) | |
| tree | 46bc7c7efb3b723b84880adb201b1b5bb3578a91 /tests | |
| parent | 2df89c5ff9bb32dab96a504116206ccce1045ccf (diff) | |
enstate: config with placeholders in parentheses
The config crate at continuum's 34434f7 takes $(env:…), $(cmd:…) and
$(file:…) as well as ${…}, so a source list may use either. A test
packs a $(cmd: …) source.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/receptor.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/receptor.rs b/tests/receptor.rs index 843eaa6..656ed1f 100644 --- a/tests/receptor.rs +++ b/tests/receptor.rs @@ -427,6 +427,9 @@ fn pack_from_sources() { "items": { "a.key": { "source": { "file": "key" } }, "a.pub": { "source": { "command": [lister, "show", "${file:key}"] } }, + // A placeholder in parentheses, as a whole value: text, its trailing line + // breaks removed. + "extra": { "source": format!("$(cmd: {lister} show extra)") }, } }); let path = host.root.join("sources.json"); @@ -442,6 +445,10 @@ fn pack_from_sources() { std::fs::read(out.join("channels/secrets/a.pub")).unwrap(), b"pub-of-K\n\n" ); + assert_eq!( + std::fs::read(out.join("channels/secrets/extra")).unwrap(), + b"pub-of-extra" + ); // The pair validator compares without trailing line breaks ($(cat)). let plan = host.apply(&schema, &out); assert!(plan.accepted, "{plan:?}"); |
