Skip to content

Commit 08d71c6

Browse files
committed
PagedPool client tests
Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
1 parent 6d951e3 commit 08d71c6

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

.github/workflows/integration.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ jobs:
174174
pool:
175175
- name: Test Pool
176176
feature: pool_tests
177+
- name: FS Pool
178+
feature: fs_pool_tests
177179

178180
steps:
179181
- name: Configure AWS credentials

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mountpoint-s3-client/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ tracing-subscriber = { version = "0.3.19", features = ["fmt", "env-filter"] }
5656
# https://github.com/rust-lang/cargo/issues/2911#issuecomment-749580481
5757
mountpoint-s3-client = { path = ".", features = ["mock"] }
5858

59+
# Required to run the tests using the custom memory pool from the fs crate.
60+
mountpoint-s3-fs = { path = "../mountpoint-s3-fs" }
61+
5962
[build-dependencies]
6063
built = { version = "0.8.0", features = ["git2"] }
6164

@@ -66,6 +69,7 @@ s3_tests = []
6669
fips_tests = []
6770
s3express_tests = []
6871
pool_tests = []
72+
fs_pool_tests = []
6973

7074
[lib]
7175
doctest = false

mountpoint-s3-client/tests/common/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ pub fn set_up_client_config(config: S3ClientConfig) -> S3ClientConfig {
7878
#[cfg(feature = "pool_tests")]
7979
let config = config.memory_pool(memory_pool::new_for_tests());
8080

81+
#[cfg(feature = "fs_pool_tests")]
82+
let config = config.memory_pool_factory(|options: mountpoint_s3_client::config::MemoryPoolFactoryOptions| {
83+
mountpoint_s3_fs::memory::PagedPool::new([options.part_size()])
84+
});
85+
8186
config
8287
}
8388

0 commit comments

Comments
 (0)