diff --git a/.gitlab/CI/build.gitlab-ci.yml b/.gitlab/CI/build.gitlab-ci.yml index e0eddc8959..d5c0fb21a6 100644 --- a/.gitlab/CI/build.gitlab-ci.yml +++ b/.gitlab/CI/build.gitlab-ci.yml @@ -8,8 +8,9 @@ unittests: - ln -s /dockercache/target target - rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly - cargo test --package veloren-i18n --lib test_all_localizations -- --nocapture --ignored + - cargo test --package veloren-common-assets asset_tweak::tests --features asset_tweak --lib - rm -r target/debug/incremental* || echo "all good" # TMP FIX FOR 2021-03-22-nightly - - cargo test --features asset_tweak + - cargo test retry: max: 2 diff --git a/common/assets/src/lib.rs b/common/assets/src/lib.rs index 3534fdcf11..d9dd19c3e3 100644 --- a/common/assets/src/lib.rs +++ b/common/assets/src/lib.rs @@ -250,7 +250,6 @@ pub fn path_of(specifier: &str, ext: &str) -> PathBuf { #[cfg(test)] mod tests { - use std::{ffi::OsStr, fs::File}; use walkdir::WalkDir; @@ -260,7 +259,10 @@ mod tests { let ext = OsStr::new("ron"); WalkDir::new(crate::ASSETS_PATH.as_path()) .into_iter() - .map(|ent| ent.unwrap().into_path()) + .map(|ent| { + ent.expect("Failed to walk over asset directory") + .into_path() + }) .filter(|path| path.is_file()) .filter(|path| { path.extension() @@ -268,7 +270,7 @@ mod tests { .unwrap_or(false) }) .for_each(|path| { - let file = File::open(&path).unwrap(); + let file = File::open(&path).expect("Failed to open the file"); if let Err(err) = ron::de::from_reader::<_, ron::Value>(file) { println!("{:?}", path); println!("{:#?}", err);