Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/data_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -315,6 +316,16 @@ mod tests {
}
}

impl PaginatedKVStore for FailingStore {
fn list_paginated(
&self, _primary_namespace: &str, _secondary_namespace: &str,
_page_token: Option<PageToken>,
) -> impl std::future::Future<Output = Result<PaginatedListResponse, io::Error>> + 'static + Send
{
async { Err(io::Error::new(io::ErrorKind::Other, "list_paginated failed")) }
}
}

fn new_failing_data_store(objects: Vec<TestObject>) -> DataStore<TestObject, Arc<TestLogger>> {
let store: Arc<DynStore> = Arc::new(DynStoreWrapper(FailingStore));
let logger = Arc::new(TestLogger::new());
Expand Down
Loading