mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-16 12:40:36 +00:00
fix: cfg(not(feature = testing)) builds
This commit is contained in:
@@ -654,7 +654,18 @@ mod filesystem_level_usage {
|
||||
tenants_dir: &Path,
|
||||
config: &'a DiskUsageEvictionTaskConfig,
|
||||
) -> anyhow::Result<Usage<'a>> {
|
||||
let stat = Statvfs::get(tenants_dir, config.mock_statvfs.as_ref())
|
||||
let mock_config = {
|
||||
#[cfg(feature = "testing")]
|
||||
{
|
||||
config.mock_statvfs.as_ref()
|
||||
}
|
||||
#[cfg(not(feature = "testing"))]
|
||||
{
|
||||
None
|
||||
}
|
||||
};
|
||||
|
||||
let stat = Statvfs::get(tenants_dir, mock_config)
|
||||
.context("statvfs failed, presumably directory got unlinked")?;
|
||||
|
||||
// https://unix.stackexchange.com/a/703650
|
||||
|
||||
Reference in New Issue
Block a user