diff --git a/src/libs/kata-types/src/container.rs b/src/libs/kata-types/src/container.rs index 16d8b159c2..83e5b93e4f 100644 --- a/src/libs/kata-types/src/container.rs +++ b/src/libs/kata-types/src/container.rs @@ -81,6 +81,7 @@ impl FromStr for ContainerType { match value { POD_CONTAINER | CONTAINER => Ok(ContainerType::PodContainer), POD_SANDBOX | PODSANDBOX | SANDBOX => Ok(ContainerType::PodSandbox), + SINGLE_CONTAINER => Ok(ContainerType::SingleContainer), _ => Err(Error::InvalidContainerType(value.to_owned())), } } @@ -230,6 +231,10 @@ mod tests { ContainerType::from_str("sandbox").unwrap(), ContainerType::PodSandbox ); + assert_eq!( + ContainerType::from_str("single_container").unwrap(), + ContainerType::SingleContainer + ); ContainerType::from_str("test").unwrap_err(); }