Skip to content

Commit

Permalink
fix: Container can be both exiting and removing in tests (#57)
Browse files Browse the repository at this point in the history
PR created by kwaak, but PR body too big

Feedback: Seems it didn't run rustfmt

---------

Co-authored-by: kwaak <[email protected]>
  • Loading branch information
timonv and kwaak authored Dec 21, 2024
1 parent 55af01e commit 5614667
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/agent/docker_tool_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,12 @@ mod tests {

// assert it stopped
let container = docker.inspect_container(&container_id, None).await.unwrap();
assert_eq!(
container.state.as_ref().unwrap().status,
Some(ContainerStateStatusEnum::REMOVING)
let status = container.state.as_ref().unwrap().status;
assert!(
status == Some(ContainerStateStatusEnum::REMOVING)
|| status == Some(ContainerStateStatusEnum::EXITED),
"Unexpected container state: {:?}",
status
);
}

Expand Down

0 comments on commit 5614667

Please sign in to comment.