pub struct ReadBackBaseline { /* private fields */ }Expand description
The REST effective view of every declared, compared resource of one
node, read before an apply writes anything. Debug withholds every value.
Implementations§
Source§impl ReadBackBaseline
impl ReadBackBaseline
Sourcepub fn build(
node: &str,
expected: &Expected,
before: &BTreeMap<String, Remote>,
written: &BTreeMap<String, Written>,
) -> ReadBackBaseline
pub fn build( node: &str, expected: &Expected, before: &BTreeMap<String, Remote>, written: &BTreeMap<String, Written>, ) -> ReadBackBaseline
The baseline of node from its pre-apply read before. A key in
written is one the run writes. Per declared, compared resource:
- not written:
BaselineBasis::DeclaredFile, its pre-apply REST view measured against the declared file (asameunit’s live file is the declared file); - written
changedwith a comparison built from the pre-apply live file, and a pre-apply RESTconfig:BaselineBasis::LiveFile, measured against that live file. Measured against the desired file instead, every path the apply changes would read as pre-existing, and a write that never took effect would go green. The entry also keeps the paths the write changes (the desired file against the live one), so each written path can be judged on its own, and those of them at which the pre-apply REST view already showed the desired value; - anything else (
added, achangedunit with no live comparison, a pre-apply view that is missing orsystem):BaselineBasis::Strict.
The path sets are uncapped: never derived from a finding’s detail, which names at most 20.
Sourcepub fn entry(&self, key: &str) -> Option<&BaselineEntry>
pub fn entry(&self, key: &str) -> Option<&BaselineEntry>
The entry of key, when it was declared.
Sourcepub fn record(&self) -> BaselineRecord
pub fn record(&self) -> BaselineRecord
The value-free record of this baseline, for read_back_baseline.json.
Per resource: the state of its pre-apply view, the basis and the
uncapped, byte-sorted paths (where it differed, and what the run
writes). Never a value and no hash of one (R5, IN-01): a hash of the
REST view, with the repo’s file beside it, would let anyone holding
the run directory test guesses for a low-entropy field offline. The
judge compares the in-memory view instead.