pub struct EvidenceTestInput {
pub test: String,
}Expand description
One test, by its stable identity or by the path a claim names it with.
Both spellings reach the same test. docs/CLAIMS.yaml names a path, the ledger keys on
an identity, and a caller holding one of them should not have to know the other; the
handler resolves a path to the identity and reads the same derivation either way.
use majordomus_cli::capability::builtin::evidence::EvidenceTestInput;
use majordomus_cli::evidence::{Runner, TestId};
let by_path: EvidenceTestInput =
serde_json::from_str(r#"{"test": "test/cases/84_distribution_model.sh"}"#).unwrap();
let id = TestId::of(&by_path.test).unwrap();
assert_eq!(id.as_string(), "suite:84_distribution_model");
assert_eq!(id.runner, Runner::Suite);
// an identity is not a path: `TestId::of` reads paths, and the handler parses the
// `<runner>:<name>` form itself
let by_id: EvidenceTestInput = serde_json::from_str(r#"{"test": "crate:why"}"#).unwrap();
assert!(TestId::of(&by_id.test).is_none());Fields§
§test: Stringsuite:84_distribution_model, crate:why, or the path itself
(test/cases/84_distribution_model.sh), which is resolved to the same identity.
Trait Implementations§
Source§impl BenchmarkCases for EvidenceTestInput
impl BenchmarkCases for EvidenceTestInput
Source§fn benchmark_cases(ctx: &CaseContext<'_>) -> Vec<NamedCase<Self>>
fn benchmark_cases(ctx: &CaseContext<'_>) -> Vec<NamedCase<Self>>
The cases, in a stable order. An empty list means “nothing to benchmark in this
repository”, which the coverage check reports as missing.
Source§fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
The cases as JSON, the shape every runner serialises from.
Source§impl Clone for EvidenceTestInput
impl Clone for EvidenceTestInput
Source§fn clone(&self) -> EvidenceTestInput
fn clone(&self) -> EvidenceTestInput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EvidenceTestInput
impl Debug for EvidenceTestInput
Source§impl<'de> Deserialize<'de> for EvidenceTestInput
impl<'de> Deserialize<'de> for EvidenceTestInput
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
Source§impl JsonSchema for EvidenceTestInput
impl JsonSchema for EvidenceTestInput
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 moreAuto Trait Implementations§
impl Freeze for EvidenceTestInput
impl RefUnwindSafe for EvidenceTestInput
impl Send for EvidenceTestInput
impl Sync for EvidenceTestInput
impl Unpin for EvidenceTestInput
impl UnsafeUnpin for EvidenceTestInput
impl UnwindSafe for EvidenceTestInput
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