Skip to content

Commit bdef274

Browse files
committed
Auto merge of #13130 - Byron:fix-flaky-tests, r=weihanglo
re-enable flaky tests thanks to update to `gix-config`. (#11821) Related to #11821. With `gix-config` now being fixed, it will properly respect `GIT_CONFIG_NOSYSTEM` both for system-wide configuration as well as for the git installation configuration. That way, credential helpers provided by the git installation won't be called anymore, which prevents them from 'somehow' emitting information to stderr. The latter was previously disabled for credential helpers, and despite [everything looking like it should work][1], it simply didn't. [1]: #13117 (comment)
2 parents 52b1320 + 189de40 commit bdef274

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testsuite/git_auth.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ fn setup_failed_auth_test() -> (SocketAddr, JoinHandle<()>, Arc<AtomicUsize>) {
105105
// Tests that HTTP auth is offered from `credential.helper`.
106106
#[cargo_test]
107107
fn http_auth_offered() {
108-
// TODO: remove this once possible.
109-
// See https://github.com/rust-lang/cargo/issues/11821
110-
if cargo_uses_gitoxide() {
111-
return;
112-
}
113108
let (addr, t, connections) = setup_failed_auth_test();
114109
let p = project()
115110
.file(
@@ -139,7 +134,6 @@ fn http_auth_offered() {
139134
// This is a "contains" check because the last error differs by platform,
140135
// may span multiple lines, and isn't relevant to this test.
141136
p.cargo("check")
142-
.env("GIX_CREDENTIALS_HELPER_STDERR", "0")
143137
.with_status(101)
144138
.with_stderr_contains(&format!(
145139
"\
@@ -373,11 +367,6 @@ Caused by:
373367

374368
#[cargo_test]
375369
fn instead_of_url_printed() {
376-
// TODO: remove this once possible.
377-
// See https://github.com/rust-lang/cargo/issues/11821
378-
if cargo_uses_gitoxide() {
379-
return;
380-
}
381370
let (addr, t, _connections) = setup_failed_auth_test();
382371
let config = paths::home().join(".gitconfig");
383372
let mut config = git2::Config::open(&config).unwrap();
@@ -404,7 +393,6 @@ fn instead_of_url_printed() {
404393
.build();
405394

406395
p.cargo("check")
407-
.env("GIX_CREDENTIALS_HELPER_STDERR", "0")
408396
.with_status(101)
409397
.with_stderr(&format!(
410398
"\

0 commit comments

Comments
 (0)