diff --git a/crates/composer/src/lib.rs b/crates/composer/src/lib.rs index 449c94c..c03eb60 100644 --- a/crates/composer/src/lib.rs +++ b/crates/composer/src/lib.rs @@ -85,12 +85,16 @@ impl Composer { ..Default::default() }); + println!("fetching res"); + let res = self .daemon .create_image(options, None, None) .try_collect::>() .await?; + println!("{:?}", res); + tracing::debug!("Pulled docker image: {:?}", res); Ok(()) diff --git a/crates/composer/tests/basic.rs b/crates/composer/tests/basic.rs index 736b228..5a47c6c 100644 --- a/crates/composer/tests/basic.rs +++ b/crates/composer/tests/basic.rs @@ -12,20 +12,26 @@ pub async fn test_basic_docker_composer() -> Result<()> { let component = ComponentConfig { name: "hello-world-container", - image_name: "hello-world", + image_name: "hello-world:linux", }; composer.pull_image(component.image_name).await?; let hello_world_container = composer.create_container(component).await?; + let all_containers = composer.list_containers(None).await?; + assert_eq!(all_containers.len(), 1); + composer.start_container(&hello_world_container.id).await?; - sleep(Duration::from_secs(2)).await; + sleep(Duration::from_secs(1)).await; composer.stop_container(&hello_world_container.id).await?; composer.remove_container(&hello_world_container.id).await?; + let all_containers = composer.list_containers(None).await?; + assert_eq!(all_containers.len(), 0); + Ok(()) }