diff --git a/src/runner/results.rs b/src/runner/results.rs new file mode 100644 index 0000000..d72bcec --- /dev/null +++ b/src/runner/results.rs @@ -0,0 +1,56 @@ +use std::collections::HashMap; + +use semver::Version; +use serde::{Deserialize, Serialize}; +use url::Url; + +use crate::complaince::suite::Suite; + +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] +pub struct ArchivableInitResult { + pub success: bool, + pub exit_code: isize, + pub container: ArchivableContainer, +} + +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] +pub struct ArchivableTestResult { + pub success: bool, + // sent by the app + pub logs: String, + pub container: ArchivableContainer, +} + +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] +pub struct ArchivableContainer { + pub logs: String, + pub name: String, +} +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] +pub struct ArchivableTest { + pub name: String, + pub url: Url, + pub version: Version, + // URL to the container image, the version should be the tag + pub container: String, + pub env_vars: Option>, + pub result: ArchivableTestResult, +} + +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] +pub struct ArchivableSuiteResult { + pub suite: Suite, + pub tests: Vec, +} + +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] +pub struct ArchivableResult { + pub commit: String, + pub suites: Vec, + pub init_containers: Option>, +} + +#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] +pub struct LatestFile { + pub latest: String, +}