Skip to content

Commit

Permalink
(Fix): Output message correctly for empty BEP (#257)
Browse files Browse the repository at this point in the history
When the BEP doesn't contain any uncached test results, we were outputting:
```bash
No JUnit files found to pack and upload using globs: Map { iter: Iter([]) }
```

Fixed this to be just a proper `[]`. No need to add a test imo because this is a very corner case and not impacting any significant functionality
  • Loading branch information
TylerJang27 authored Dec 30, 2024
1 parent 9dfffcf commit 0fdcc4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cli/src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ pub async fn run_upload(
if file_counter.get_count() == 0 {
log::warn!(
"No JUnit files found to pack and upload using globs: {:?}",
junit_path_wrappers.iter().map(|j| &j.junit_path)
junit_path_wrappers
.iter()
.map(|j| &j.junit_path)
.collect::<Vec<&String>>()
);
}

Expand Down
3 changes: 1 addition & 2 deletions context/src/junit/junit_path.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use bazel_bep::types::build_event_stream::TestStatus;
#[cfg(feature = "pyo3")]
use pyo3::prelude::*;
#[cfg(feature = "pyo3")]
Expand All @@ -8,8 +9,6 @@ use tsify_next::Tsify;
#[cfg(feature = "wasm")]
use wasm_bindgen::prelude::*;

use bazel_bep::types::build_event_stream::TestStatus;

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
#[cfg_attr(feature = "pyo3", gen_stub_pyclass_enum, pyclass(eq, eq_int))]
#[cfg_attr(feature = "wasm", derive(Tsify))]
Expand Down

0 comments on commit 0fdcc4b

Please sign in to comment.