From 558ec8222dcb80422c725126b3113659b6d7094d Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Fri, 26 Jun 2026 10:43:46 +0200 Subject: [PATCH] Fix DataStore failing store pagination DataStore persistence failure tests use FailingStore through DynStoreWrapper. That wrapper now requires paginated store support, so make the helper fail paginated listings the same way it fails the other store calls. Co-Authored-By: HAL 9000 --- src/data_store.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/data_store.rs b/src/data_store.rs index 3176e7ce2..13afeca7e 100644 --- a/src/data_store.rs +++ b/src/data_store.rs @@ -225,6 +225,7 @@ where mod tests { use lightning::impl_writeable_tlv_based; use lightning::io; + use lightning::util::persist::{PageToken, PaginatedKVStore, PaginatedListResponse}; use lightning::util::test_utils::TestLogger; use super::*; @@ -315,6 +316,16 @@ mod tests { } } + impl PaginatedKVStore for FailingStore { + fn list_paginated( + &self, _primary_namespace: &str, _secondary_namespace: &str, + _page_token: Option, + ) -> impl std::future::Future> + 'static + Send + { + async { Err(io::Error::new(io::ErrorKind::Other, "list_paginated failed")) } + } + } + fn new_failing_data_store(objects: Vec) -> DataStore> { let store: Arc = Arc::new(DynStoreWrapper(FailingStore)); let logger = Arc::new(TestLogger::new());