blob: 0e6797b88f803bae29ee0f07f3b6a1c322f19a68 [file] [log] [blame] [edit]
use rustainers::DockerContainerGuard;
use rustainers::DockerContainerGuardError;
use std::env;
#[tokio::test]
async fn test_nova_ssh() -> Result<(), DockerContainerGuardError> {
let guard = DockerContainerGuard::spawn(&format!(
"{}/nova-ssh:{}",
env::var("REGISTRY").unwrap_or_else(|_| "harbor.atmosphere.dev/library".to_string()),
env::var("TAG").unwrap_or_else(|_| "main".to_string())
))
.await?;
let user = guard.get_user("nova").await?;
assert_eq!(user.uid, 42424);
assert_eq!(user.gid, 42424);
assert_eq!(user.dir, "/var/lib/nova");
assert_eq!(user.shell, "/bin/bash");
Ok(())
}