Skip to content

Commit

Permalink
chore: resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
the-wondersmith committed Dec 6, 2024
1 parent a682b3b commit 820db74
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions testcontainers/src/runners/async_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,33 @@ where
]),
);

#[cfg(feature = "reusable-containers")]
{
if container_req.reuse() {
if let Some(container_id) = client
.get_running_container_id(
container_req.container_name().as_deref(),
container_req.network().as_deref(),
&labels,
)
.await?
{
let network = if let Some(network) = container_req.network() {
Network::new(network, client.clone()).await?
} else {
None
};

return Ok(ContainerAsync::construct(
container_id,
client,
container_req,
network,
));
}
}
}

let mut config: Config<String> = Config {
image: Some(container_req.descriptor()),
labels: Some(labels),
Expand Down

0 comments on commit 820db74

Please sign in to comment.