mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-06 02:48:25 +00:00
test(agent): honor Docker shell integration preconditions
This commit is contained in:
parent
9083b1b035
commit
4d5458b64c
1 changed files with 10 additions and 9 deletions
|
|
@ -17,7 +17,7 @@ use tokio_util::sync::CancellationToken;
|
|||
#[tokio::test]
|
||||
#[ignore = "requires real Docker container lifecycle; run explicitly when changing shell tool exec integration"]
|
||||
async fn shell_reports_real_docker_process_outcome() {
|
||||
let sandbox = DockerSandbox::new(
|
||||
let Ok(sandbox) = DockerSandbox::new(
|
||||
DockerSandboxOptions {
|
||||
image: "buildpack-deps:noble".to_string(),
|
||||
auto_pull: false,
|
||||
|
|
@ -28,12 +28,13 @@ async fn shell_reports_real_docker_process_outcome() {
|
|||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.expect("docker sandbox should construct");
|
||||
sandbox
|
||||
.initialize()
|
||||
.await
|
||||
.expect("docker sandbox should initialize");
|
||||
) else {
|
||||
return;
|
||||
};
|
||||
// No Docker daemon or no local image: the integration precondition is not met.
|
||||
if sandbox.initialize().await.is_err() {
|
||||
return;
|
||||
}
|
||||
|
||||
let sandbox = Arc::new(sandbox);
|
||||
let emitter = Emitter::new();
|
||||
|
|
@ -49,8 +50,8 @@ async fn shell_reports_real_docker_process_outcome() {
|
|||
root_session_id: Some("test-session".to_string()),
|
||||
tool_call_id: Some("call_1".to_string()),
|
||||
agent_event_emitter: Some(Arc::new(SessionBoundEmitter {
|
||||
emitter,
|
||||
session_id: "test-session".to_string(),
|
||||
emitter: emitter.clone(),
|
||||
session_id: "test-session".to_string(),
|
||||
tool_call_id: Some("call_1".to_string()),
|
||||
})),
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue