Wave 6: Integration tests, golden tests, index invariant tests, diff command (bd-rex, bd-2gp, bd-1ck)
This commit is contained in:
@@ -12,6 +12,7 @@ use crate::core::indexer::{build_index, resolve_pointer};
|
||||
use crate::core::spec::SpecIndex;
|
||||
use crate::errors::SwaggerCliError;
|
||||
use crate::output::robot;
|
||||
use crate::utils::dir_size;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// CLI arguments
|
||||
@@ -103,22 +104,6 @@ struct AliasCheckResult {
|
||||
// Helpers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Compute total size of a directory (non-recursive into symlinks).
|
||||
fn dir_size(path: &PathBuf) -> u64 {
|
||||
let Ok(entries) = fs::read_dir(path) else {
|
||||
return 0;
|
||||
};
|
||||
let mut total: u64 = 0;
|
||||
for entry in entries.flatten() {
|
||||
if let Ok(md) = entry.metadata()
|
||||
&& md.is_file()
|
||||
{
|
||||
total += md.len();
|
||||
}
|
||||
}
|
||||
total
|
||||
}
|
||||
|
||||
/// Discover all alias directory names in the cache dir, including those
|
||||
/// without a valid meta.json (which list_aliases would skip).
|
||||
fn discover_alias_dirs(cache_root: &PathBuf) -> Vec<String> {
|
||||
|
||||
Reference in New Issue
Block a user