Skip to content

Integrate container test #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 25, 2022
15 changes: 8 additions & 7 deletions src/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::io::{self, Read};
use std::str::FromStr;
use std::sync::{Arc, Mutex, MutexGuard, PoisonError};

#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[allow(non_snake_case)]
pub struct Container {
pub Id: String,
Expand Down Expand Up @@ -47,13 +47,13 @@ pub enum PortType {
Udp,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
#[allow(non_snake_case)]
pub struct HostConfig {
pub NetworkMode: String,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[allow(non_snake_case)]
pub struct SummaryNetworkSettings {
pub Networks: Option<HashMap<String, Option<Network>>>,
Expand Down Expand Up @@ -145,7 +145,7 @@ pub struct Config {
pub WorkingDir: String,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
#[allow(non_snake_case)]
pub struct Mount {
// Name (optional)
Expand Down Expand Up @@ -200,7 +200,8 @@ pub struct LogMessage {
pub Output: String,
}

#[derive(Debug, Clone, Serialize, PartialEq)]
#[derive(Debug, Clone, Serialize, PartialEq, PartialOrd, Eq, Ord)]
#[serde(rename_all = "lowercase")]
pub enum HealthState {
/// Indicates there is no healthcheck
NoHealthcheck,
Expand Down Expand Up @@ -290,7 +291,7 @@ impl std::fmt::Display for ContainerInfo {
}
}

#[derive(Debug, PartialEq, PartialOrd, Serialize)]
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum ContainerStatus {
Created,
Expand All @@ -302,7 +303,7 @@ pub enum ContainerStatus {
Dead,
}

#[derive(Debug, PartialEq, PartialOrd, Serialize)]
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Serialize)]
pub struct ContainerFilters {
#[serde(skip_serializing_if = "Vec::is_empty")]
id: Vec<String>,
Expand Down
Loading