Disable flaky network tests (#12010)

# Description
Ignores some network tests that sometimes fail in CI. E.g., in
[11953](https://github.com/nushell/nushell/pull/11953#issuecomment-1962275863)
and
[11654](https://github.com/nushell/nushell/pull/11654#issuecomment-1968404551).
This commit is contained in:
Ian Manske 2024-02-28 16:28:33 +00:00 committed by GitHub
parent 387328fe73
commit 0126620c19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -243,26 +243,32 @@ fn http_get_redirect_mode_error() {
// These tests require network access; they use badssl.com which is a Google-affiliated site for testing various SSL errors.
// Revisit this if these tests prove to be flaky or unstable.
//
// These tests are flaky and cause CI to fail somewhat regularly. See PR #12010.
#[test]
#[ignore = "unreliable test"]
fn http_get_expired_cert_fails() {
let actual = nu!("http get https://expired.badssl.com/");
assert!(actual.err.contains("network_failure"));
}
#[test]
#[ignore = "unreliable test"]
fn http_get_expired_cert_override() {
let actual = nu!("http get --insecure https://expired.badssl.com/");
assert!(actual.out.contains("<html>"));
}
#[test]
#[ignore = "unreliable test"]
fn http_get_self_signed_fails() {
let actual = nu!("http get https://self-signed.badssl.com/");
assert!(actual.err.contains("network_failure"));
}
#[test]
#[ignore = "unreliable test"]
fn http_get_self_signed_override() {
let actual = nu!("http get --insecure https://self-signed.badssl.com/");
assert!(actual.out.contains("<html>"));