Skip to content

Commit

Permalink
rename test_runner_status to resolved_status
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerJang27 committed Dec 18, 2024
1 parent 102b20d commit a8d2c9b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions bundle/src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct FileSet {
pub files: Vec<BundledFile>,
pub glob: String,
/// Added in v0.6.11. Populated when parsing from BEP, not from junit globs
pub test_runner_status: Option<JunitReportStatus>,
pub resolved_status: Option<JunitReportStatus>,
}

impl FileSet {
Expand All @@ -58,7 +58,7 @@ impl FileSet {
) -> anyhow::Result<FileSet> {
let JunitReportFileWithStatus {
junit_path: glob_path,
status: test_runner_status,
status: resolved_status,
} = glob_with_status;
let path_to_scan = if !std::path::Path::new(&glob_path).is_absolute() {
std::path::Path::new(repo_root)
Expand Down Expand Up @@ -154,7 +154,7 @@ impl FileSet {
file_set_type: FileSetType::Junit,
files,
glob: glob_path,
test_runner_status,
resolved_status,
})
}
}
18 changes: 9 additions & 9 deletions cli/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ pub async fn extract_failed_tests(
let mut successes: HashMap<String, i64> = HashMap::new();

for file_set in file_sets {
if let Some(test_runner_status) = &file_set.test_runner_status {
if let Some(resolved_status) = &file_set.resolved_status {
// TODO(TRUNK-13911): We should populate the status for all junits, regardless of the presence of a test runner status.
if test_runner_status != &JunitReportStatus::Failed {
if resolved_status != &JunitReportStatus::Failed {
continue;
}
}
Expand Down Expand Up @@ -366,7 +366,7 @@ mod tests {
},
],
glob: String::from("**/*.xml"),
test_runner_status: None,
resolved_status: None,
}];

let retried_failures =
Expand All @@ -389,7 +389,7 @@ mod tests {
},
],
glob: String::from("**/*.xml"),
test_runner_status: None,
resolved_status: None,
}];

let retried_failures =
Expand All @@ -412,7 +412,7 @@ mod tests {
},
],
glob: String::from("**/*.xml"),
test_runner_status: None,
resolved_status: None,
}];

let mut multi_failures =
Expand Down Expand Up @@ -446,7 +446,7 @@ mod tests {
},
],
glob: String::from("**/*.xml"),
test_runner_status: None,
resolved_status: None,
}];

let some_failures =
Expand All @@ -465,7 +465,7 @@ mod tests {
..BundledFile::default()
}],
glob: String::from("1/*.xml"),
test_runner_status: Some(JunitReportStatus::Passed),
resolved_status: Some(JunitReportStatus::Passed),
},
FileSet {
file_set_type: FileSetType::Junit,
Expand All @@ -474,7 +474,7 @@ mod tests {
..BundledFile::default()
}],
glob: String::from("2/*.xml"),
test_runner_status: Some(JunitReportStatus::Flaky),
resolved_status: Some(JunitReportStatus::Flaky),
},
FileSet {
file_set_type: FileSetType::Junit,
Expand All @@ -483,7 +483,7 @@ mod tests {
..BundledFile::default()
}],
glob: String::from("3/*.xml"),
test_runner_status: Some(JunitReportStatus::Failed),
resolved_status: Some(JunitReportStatus::Failed),
},
];

Expand Down
2 changes: 1 addition & 1 deletion context-js/tests/parse_compressed_bundle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const generateBundleMeta = (): TestBundleMeta => ({
},
],
glob: "**/*.xml",
test_runner_status: null,
resolved_status: null,
},
],
org: faker.company.name(),
Expand Down

0 comments on commit a8d2c9b

Please sign in to comment.