From c1c9dea0333141a8f6bae384f9099a27d0bd7537 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sun, 3 Nov 2024 20:11:21 +0100 Subject: [PATCH] tests: actually delete the buffer in the buffer fixture --- src/tests/fixtures.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tests/fixtures.rs b/src/tests/fixtures.rs index 37fed29..9c2ea1d 100644 --- a/src/tests/fixtures.rs +++ b/src/tests/fixtures.rs @@ -253,11 +253,15 @@ impl async fn cleanup( &mut self, - _resource: Option<( + mut resource: Option<( (crate::Client, crate::Workspace, crate::buffer::Controller), (crate::Client, crate::Workspace, crate::buffer::Controller), )>, ) { - // buffer deletion is implied in workspace deletion + if let Some(((_, ws, buf), (_, _, _))) = resource.take() { + if let Err(e) = ws.delete_buffer(buf.path()).await { + eprintln!("could not delete buffer: {e:?}"); + } + } } }