diff --git a/tests/e2e_mcp.rs b/tests/e2e_mcp.rs index d020108..8b7f844 100644 --- a/tests/e2e_mcp.rs +++ b/tests/e2e_mcp.rs @@ -889,10 +889,16 @@ async fn e2e_batch_store_basic() -> anyhow::Result<()> { wait_until_ready(&client, &base).await; let agent = format!("batch_{}", uuid::Uuid::new_v4()); - let _ = call_tool(&client, &base, "purge", json!({ "agent_id": agent, "confirm": true })).await; + let _ = call_tool( + &client, + &base, + "purge", + json!({ "agent_id": agent.clone(), "confirm": true }), + ) + .await; let result = call_tool(&client, &base, "batch_store", serde_json::json!({ - "agent_id": agent, + "agent_id": agent.clone(), "entries": [ {"content": "Fact alpha for batch test"}, {"content": "Fact beta for batch test"}, @@ -900,6 +906,14 @@ async fn e2e_batch_store_basic() -> anyhow::Result<()> { ] })).await; + let _ = call_tool( + &client, + &base, + "purge", + json!({ "agent_id": agent, "confirm": true }), + ) + .await; + assert!(result["success"].as_bool().unwrap_or(false)); assert_eq!(result["count"].as_i64().unwrap_or(0), 3); Ok(()) @@ -1045,13 +1059,27 @@ async fn e2e_existing_store_unchanged() -> anyhow::Result<()> { wait_until_ready(&client, &base).await; let agent = format!("compat_{}", uuid::Uuid::new_v4()); - let _ = call_tool(&client, &base, "purge", json!({ "agent_id": agent, "confirm": true })).await; + let _ = call_tool( + &client, + &base, + "purge", + json!({ "agent_id": agent.clone(), "confirm": true }), + ) + .await; let result = call_tool(&client, &base, "store", serde_json::json!({ - "agent_id": agent, + "agent_id": agent.clone(), "content": "Original store still works" })).await; + let _ = call_tool( + &client, + &base, + "purge", + json!({ "agent_id": agent, "confirm": true }), + ) + .await; + assert!(result["success"].as_bool().unwrap_or(false)); Ok(()) }