mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-01-25 06:26:41 +00:00
dragonball: Fix UT failed in test_fs_manipulate_backend_fs
Improve the checking logic for source path existing. Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
This commit is contained in:
@@ -1250,11 +1250,12 @@ pub mod tests {
|
||||
#[cfg(feature = "test-resources")]
|
||||
fn test_fs_manipulate_backend_fs() {
|
||||
let source = "/test_resources/nydus-rs/bootstrap/image_v2.boot";
|
||||
let source_path = PathBuf::from(source);
|
||||
let bootstrapfile = source_path.to_str().unwrap().to_string();
|
||||
let source_path = PathBuf::from(&source);
|
||||
if !source_path.exists() {
|
||||
panic!("Test resource file not found: {}", bootstrapfile);
|
||||
eprintln!("Test resource file not found: {}", source);
|
||||
return;
|
||||
}
|
||||
let bootstrapfile = source.to_string();
|
||||
// mount
|
||||
{
|
||||
// invalid fs type
|
||||
|
||||
Reference in New Issue
Block a user