pub struct TestProof {
pub path: String,
pub kind: ArtifactKind,
pub present: bool,
pub test: Option<String>,
pub state: ProofState,
pub meaning: String,
pub execution: Option<Execution>,
pub reproduce: Option<String>,
pub gates: Vec<String>,
}Expand description
One test a rule names, joined to what was recorded against it.
§Example
use majordomus_cli::rules::{ArtifactKind, TestProof};
use majordomus_cli::evidence::ProofState;
let t = TestProof {
path: "test/cases/07_scope.sh".into(),
kind: ArtifactKind::Case,
present: true,
test: Some("suite:07_scope".into()),
state: ProofState::NotRun,
meaning: ProofState::NotRun.meaning().into(),
execution: None,
reproduce: Some("bash test/run.sh 07_scope".into()),
gates: vec!["shell-suite".into()],
};
assert_eq!(t.kind, ArtifactKind::Case);Fields§
§path: StringThe path the rule names.
kind: ArtifactKindWhat drives it: a runner, a CI gate, or nothing.
present: boolWhether that path is in the tree.
test: Option<String>The canonical test identity (suite:<case>, crate:<binary>), when a runner owns
the path. Absent means no runner drives it, so no run of it can ever be recorded.
state: ProofStateWhat the repository can say about this test’s latest run.
meaning: StringThat state, in one sentence, from the one place it is worded.
execution: Option<Execution>The execution behind the state, when there is one.
reproduce: Option<String>The command that runs this test again.
gates: Vec<String>The CI gates that run this test, derived from the repository’s own CI model.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TestProof
impl<'de> Deserialize<'de> for TestProof
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TestProof
Source§impl JsonSchema for TestProof
impl JsonSchema for TestProof
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for TestProof
Auto Trait Implementations§
impl Freeze for TestProof
impl RefUnwindSafe for TestProof
impl Send for TestProof
impl Sync for TestProof
impl Unpin for TestProof
impl UnsafeUnpin for TestProof
impl UnwindSafe for TestProof
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.