From 300f6620c0ce4fe59d84dc012090b5b00a6be73a Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 5 Nov 2024 00:18:06 +0100 Subject: [PATCH] fix: cleanup for buffer fixture idk who made this?? it was already fixed in dev env, uncommitted Co-authored-by: cschen Co-authored-by: zaaarf --- src/tests/fixtures.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tests/fixtures.rs b/src/tests/fixtures.rs index 6409935..9a0ae60 100644 --- a/src/tests/fixtures.rs +++ b/src/tests/fixtures.rs @@ -237,14 +237,16 @@ impl async fn cleanup( &mut self, - mut resource: Option<( + resource: Option<( (crate::Client, crate::Workspace, crate::buffer::Controller), (crate::Client, crate::Workspace, crate::buffer::Controller), )>, ) { - if let Some(((_, ws, buf), (_, _, _))) = resource.take() { - if let Err(e) = ws.delete_buffer(buf.path()).await { - eprintln!("could not delete buffer: {e:?}"); + if let Some(((client, _, _), (_, _, _))) = resource { + // buffer deletion is implied in workspace deletion + client.leave_workspace(&self.workspace); + if let Err(e) = client.delete_workspace(&self.workspace).await { + eprintln!("could not delete workspace: {e}"); } } }