History

Fix gix-credentials tests in helper::cascade when sh is not in path

This builds on the partial test suite fix in the preceding commit to fix the remaining affected tests. The previously fixed tests were in `helper::invoke`. These are in `helper::cascade::invoke`: gix-credentials::credentials helper::cascade::invoke::credentials_are_filled_in_one_by_one_and_stop_when_complete gix-credentials::credentials helper::cascade::invoke::expired_credentials_are_not_returned gix-credentials::credentials helper::cascade::invoke::failing_helpers_for_filling_dont_interrupt gix-credentials::credentials helper::cascade::invoke::helpers_can_quit_and_their_creds_are_taken_if_complete gix-credentials::credentials helper::cascade::invoke::bogus_password_overrides_any_helper_and_helper_overrides_username_in_url gix-credentials::credentials helper::cascade::invoke::helpers_can_set_any_context_value gix-credentials::credentials helper::cascade::invoke::helpers_can_set_any_context_value_using_the_url_only gix-credentials::credentials helper::cascade::invoke::partial_credentials_can_be_overwritten_by_complete_ones gix-credentials::credentials helper::cascade::invoke::urls_are_split_in_get_but_can_skip_the_path_in_host_only_urls gix-credentials::credentials helper::cascade::invoke::urls_are_split_in_get_to_support_scripts gix-credentials::credentials helper::cascade::invoke::usernames_in_urls_are_kept_if_the_helper_does_not_overwrite_it However, the fix may still benefit from refactoring.

Eliah Kagan committed 10 months ago

Commit 0ceff021 parent 8b8fa0f1 file · +1 −6Browse files

Unified · Split

gix-credentials/tests/helper/cascade.rs+1−6
@@ -181,12 +181,7 @@ mod invoke { · 180 unmodified lines
181 fn fixtures<'a>(names: impl IntoIterator<Item = &'a str>) -> Vec<Program> {181 fn fixtures<'a>(names: impl IntoIterator<Item = &'a str>) -> Vec<Program> {
182 names182 names
183 .into_iter()183 .into_iter()
184 .map(|name| gix_path::realpath(fixture_path(format!("{name}.sh"))).unwrap())184 .map(super::super::invoke::script_helper)
185 .map(|path| {
186 let mut script = gix_path::to_unix_separators_on_windows(gix_path::into_bstr(path)).into_owned();
187 script.insert_str(0, "sh ");
188 Program::from_kind(program::Kind::ExternalShellScript(script))
189 })
190 .collect()185 .collect()
191 }186 }
192}187}