diff options
Diffstat (limited to 'crates/shirabe/tests/util')
| -rw-r--r-- | crates/shirabe/tests/util/auth_helper_test.rs | 5 | ||||
| -rw-r--r-- | crates/shirabe/tests/util/http/proxy_manager_test.rs | 12 | ||||
| -rw-r--r-- | crates/shirabe/tests/util/http/request_proxy_test.rs | 1 | ||||
| -rw-r--r-- | crates/shirabe/tests/util/ini_helper_test.rs | 10 | ||||
| -rw-r--r-- | crates/shirabe/tests/util/no_proxy_pattern_test.rs | 4 | ||||
| -rw-r--r-- | crates/shirabe/tests/util/platform_test.rs | 4 | ||||
| -rw-r--r-- | crates/shirabe/tests/util/silencer_test.rs | 2 | ||||
| -rw-r--r-- | crates/shirabe/tests/util/stream_context_factory_test.rs | 10 | ||||
| -rw-r--r-- | crates/shirabe/tests/util/tar_test.rs | 14 | ||||
| -rw-r--r-- | crates/shirabe/tests/util/url_test.rs | 1 |
10 files changed, 34 insertions, 29 deletions
diff --git a/crates/shirabe/tests/util/auth_helper_test.rs b/crates/shirabe/tests/util/auth_helper_test.rs index 95cd3a2d..91d9cb75 100644 --- a/crates/shirabe/tests/util/auth_helper_test.rs +++ b/crates/shirabe/tests/util/auth_helper_test.rs @@ -583,7 +583,10 @@ fn test_store_auth_with_prompt_invalid_answer() { // same username/password IOStub already returns. Since getAuthentication is a static stub, that // looks like "no auth change" and AuthHelper raises a TransportException. #[test] -#[ignore] +#[ignore = "AuthHelper::prompt_auth_if_needed's in_gitlab_domains/in_github_domains checks call \ +PhpMixed::as_array(), which returns None for PhpMixed::List; Config's default gitlab-domains/\ +github-domains values are PhpMixed::List, so the domain match never fires and no GitLab-specific \ +TransportException is raised"] fn test_prompt_auth_if_needed_git_lab_no_auth_change() { use crate::io_stub::IOStub; use shirabe::downloader::TransportException; diff --git a/crates/shirabe/tests/util/http/proxy_manager_test.rs b/crates/shirabe/tests/util/http/proxy_manager_test.rs index d37a1fd8..4383978d 100644 --- a/crates/shirabe/tests/util/http/proxy_manager_test.rs +++ b/crates/shirabe/tests/util/http/proxy_manager_test.rs @@ -64,7 +64,7 @@ fn test_instantiation() { } #[test] -#[ignore] +#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"] fn test_get_proxy_for_request_throws_on_bad_proxy_url() { let _tear_down = TearDown; set_up(); @@ -82,7 +82,7 @@ fn test_get_proxy_for_request_throws_on_bad_proxy_url() { } #[test] -#[ignore] +#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"] fn test_lowercase_overrides_uppercase() { let _tear_down = TearDown; set_up(); @@ -129,7 +129,7 @@ fn test_lowercase_overrides_uppercase() { } #[test] -#[ignore] +#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"] fn test_cgi_proxy_is_only_used_when_no_http_proxy() { let _tear_down = TearDown; set_up(); @@ -167,7 +167,7 @@ fn test_cgi_proxy_is_only_used_when_no_http_proxy() { } #[test] -#[ignore] +#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"] fn test_no_http_proxy_does_not_use_https_proxy() { let _tear_down = TearDown; set_up(); @@ -184,7 +184,7 @@ fn test_no_http_proxy_does_not_use_https_proxy() { } #[test] -#[ignore] +#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"] fn test_no_https_proxy_does_not_use_http_proxy() { let _tear_down = TearDown; set_up(); @@ -201,7 +201,7 @@ fn test_no_https_proxy_does_not_use_http_proxy() { } #[test] -#[ignore] +#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"] fn test_get_proxy_for_request() { use indexmap::IndexMap; use shirabe_php_shim::PhpMixed; diff --git a/crates/shirabe/tests/util/http/request_proxy_test.rs b/crates/shirabe/tests/util/http/request_proxy_test.rs index 3e96a7b4..0a17b5f8 100644 --- a/crates/shirabe/tests/util/http/request_proxy_test.rs +++ b/crates/shirabe/tests/util/http/request_proxy_test.rs @@ -128,7 +128,6 @@ fn test_get_curl_options() { } #[test] -#[ignore] fn test_get_curl_options_with_ssl() { let mut cafile_opts: IndexMap<String, PhpMixed> = IndexMap::new(); cafile_opts.insert( diff --git a/crates/shirabe/tests/util/ini_helper_test.rs b/crates/shirabe/tests/util/ini_helper_test.rs index d1e2071e..76705a09 100644 --- a/crates/shirabe/tests/util/ini_helper_test.rs +++ b/crates/shirabe/tests/util/ini_helper_test.rs @@ -43,7 +43,6 @@ fn set_env(paths: &[&str]) { } #[test] -#[ignore] fn test_with_no_ini() { let paths = [""]; @@ -56,7 +55,8 @@ fn test_with_no_ini() { } #[test] -#[ignore] +#[ignore = "XdebugHandler::get_all_ini_files() is stubbed to always return [\"\"], ignoring \ +COMPOSER_ORIGINAL_INIS entirely"] fn test_with_loaded_ini_only() { let paths = ["loaded.ini"]; @@ -65,7 +65,8 @@ fn test_with_loaded_ini_only() { } #[test] -#[ignore] +#[ignore = "XdebugHandler::get_all_ini_files() is stubbed to always return [\"\"], ignoring \ +COMPOSER_ORIGINAL_INIS entirely"] fn test_with_loaded_ini_and_additional() { let paths = ["loaded.ini", "one.ini", "two.ini"]; @@ -78,7 +79,8 @@ fn test_with_loaded_ini_and_additional() { } #[test] -#[ignore] +#[ignore = "XdebugHandler::get_all_ini_files() is stubbed to always return [\"\"], ignoring \ +COMPOSER_ORIGINAL_INIS entirely"] fn test_without_loaded_ini_and_additional() { let paths = ["", "one.ini", "two.ini"]; diff --git a/crates/shirabe/tests/util/no_proxy_pattern_test.rs b/crates/shirabe/tests/util/no_proxy_pattern_test.rs index 51017ea8..e59e28a6 100644 --- a/crates/shirabe/tests/util/no_proxy_pattern_test.rs +++ b/crates/shirabe/tests/util/no_proxy_pattern_test.rs @@ -42,7 +42,7 @@ fn test_host_name() { } #[test] -#[ignore] +#[ignore = "shirabe_php_shim::chr() lossily re-encodes bytes >= 0x80 as UTF-8 (TODO(phase-d) in its own doc comment); ip_map_to_6's chr(255) filler bytes become 3-byte U+FFFD replacements, corrupting the mapped IPv4-in-IPv6 byte arrays used for comparison"] fn test_ip_address() { let noproxy = "192.168.1.1, 2001:db8::52:0:1"; @@ -55,7 +55,7 @@ fn test_ip_address() { } #[test] -#[ignore] +#[ignore = "shirabe_php_shim::chr() lossily re-encodes bytes >= 0x80 as UTF-8 (TODO(phase-d) in its own doc comment); ip_get_mask's chr(255)/chr(0xff^...) calls corrupt the CIDR netmask bytes used in match_range, breaking all prefix-based no_proxy matching"] fn test_ip_range() { let noproxy = "10.0.0.0/30, 2002:db8:a::45/121"; diff --git a/crates/shirabe/tests/util/platform_test.rs b/crates/shirabe/tests/util/platform_test.rs index c5fe1908..97ab0bbe 100644 --- a/crates/shirabe/tests/util/platform_test.rs +++ b/crates/shirabe/tests/util/platform_test.rs @@ -4,7 +4,9 @@ use shirabe::util::platform::Platform; use shirabe_php_shim::defined; #[test] -#[ignore] +#[ignore = "Preg::replace_callback doesn't set PREG_UNMATCHED_AS_NULL, so the non-participating \ +alternation branch (dvar) is captured as an empty string instead of absent; Platform::expand_path's \ +matches.get(dvar).or_else(pvar) then picks the empty dvar over pvar for the %VAR% form"] fn test_expand_path() { Platform::put_env("TESTENV", "/home/test"); assert_eq!( diff --git a/crates/shirabe/tests/util/silencer_test.rs b/crates/shirabe/tests/util/silencer_test.rs index 1b653240..000e7371 100644 --- a/crates/shirabe/tests/util/silencer_test.rs +++ b/crates/shirabe/tests/util/silencer_test.rs @@ -7,7 +7,7 @@ use shirabe_php_shim::{ /// Test succeeds when no warnings are emitted externally, and original level is restored. #[test] -#[ignore] +#[ignore = "shirabe_php_shim::trigger_error is still todo!() (PHP error subsystem not modeled)"] fn test_silencer() { let before = error_reporting(None); diff --git a/crates/shirabe/tests/util/stream_context_factory_test.rs b/crates/shirabe/tests/util/stream_context_factory_test.rs index 2ef2b6b7..f9d840cf 100644 --- a/crates/shirabe/tests/util/stream_context_factory_test.rs +++ b/crates/shirabe/tests/util/stream_context_factory_test.rs @@ -119,7 +119,7 @@ fn test_get_context() { #[test] #[serial_test::serial] -#[ignore] +#[ignore = "fix_http_header_field's uasort comparator (ported verbatim, ignores its second argument) is not a valid ordering; Rust's stable sort_by resolves the resulting ties differently than PHP's Zend sort, so the header order diverges from expected"] fn test_http_proxy() { let _tear_down = TearDown; set_up(); @@ -227,7 +227,7 @@ fn test_http_proxy_with_no_proxy_wildcard() { #[test] #[serial_test::serial] -#[ignore] +#[ignore = "fix_http_header_field's uasort comparator (ported verbatim, ignores its second argument) is not a valid ordering; Rust's stable sort_by resolves the resulting ties differently than PHP's Zend sort, so the header order diverges from expected"] fn test_options_are_preserved() { let _tear_down = TearDown; set_up(); @@ -275,7 +275,7 @@ fn test_options_are_preserved() { #[test] #[serial_test::serial] -#[ignore] +#[ignore = "fix_http_header_field's uasort comparator (ported verbatim, ignores its second argument) is not a valid ordering; Rust's stable sort_by resolves the resulting ties differently than PHP's Zend sort, so the header order diverges from expected"] fn test_http_proxy_without_port() { let _tear_down = TearDown; set_up(); @@ -418,7 +418,7 @@ fn test_ensure_thatfix_http_header_field_moves_content_type_to_end_of_options() #[test] #[serial_test::serial] -#[ignore] +#[ignore = "init_options only inserts the 'header' key when 'http' already exists in options; PHP's `$options['http']['header'] = []` auto-vivifies 'http', but the Rust port's `if let Some(PhpMixed::Array(http)) = options.get_mut(\"http\")` guard silently no-ops on an empty options map, leaving 'http' absent"] fn test_init_options_does_include_proxy_auth_headers() { let _tear_down = TearDown; set_up(); @@ -446,7 +446,7 @@ fn test_init_options_does_include_proxy_auth_headers() { #[test] #[serial_test::serial] -#[ignore] +#[ignore = "init_options only inserts the 'header' key when 'http' already exists in options; PHP's `$options['http']['header'] = []` auto-vivifies 'http', but the Rust port's `if let Some(PhpMixed::Array(http)) = options.get_mut(\"http\")` guard silently no-ops on an empty options map, leaving 'http' absent"] fn test_init_options_for_curl_does_not_include_proxy_auth_headers() { let _tear_down = TearDown; set_up(); diff --git a/crates/shirabe/tests/util/tar_test.rs b/crates/shirabe/tests/util/tar_test.rs index 48f1cbe0..7a172a7a 100644 --- a/crates/shirabe/tests/util/tar_test.rs +++ b/crates/shirabe/tests/util/tar_test.rs @@ -12,7 +12,7 @@ fn fixture(name: &str) -> String { } #[test] -#[ignore] +#[ignore = "PharData::new() (crates/shirabe-php-shim/src/phar.rs:91) is still todo!(), which Tar::get_composer_json depends on for every fixture"] fn test_returns_nullif_the_tar_is_not_found() { let result = Tar::get_composer_json(&fixture("invalid.zip")).unwrap(); @@ -20,26 +20,26 @@ fn test_returns_nullif_the_tar_is_not_found() { } #[test] -#[ignore] +#[ignore = "PharData::new() (crates/shirabe-php-shim/src/phar.rs:91) is still todo!(), which Tar::get_composer_json depends on for every fixture"] fn test_returns_null_if_the_tar_is_empty() { let result = Tar::get_composer_json(&fixture("empty.tar.gz")).unwrap(); assert_eq!(None, result); } #[test] -#[ignore] +#[ignore = "PharData::new() (crates/shirabe-php-shim/src/phar.rs:91) is still todo!(), which Tar::get_composer_json depends on for every fixture"] fn test_throws_exception_if_the_tar_has_no_composer_json() { assert!(Tar::get_composer_json(&fixture("nojson.tar.gz")).is_err()); } #[test] -#[ignore] +#[ignore = "PharData::new() (crates/shirabe-php-shim/src/phar.rs:91) is still todo!(), which Tar::get_composer_json depends on for every fixture"] fn test_throws_exception_if_the_composer_json_is_in_a_sub_subfolder() { assert!(Tar::get_composer_json(&fixture("subfolders.tar.gz")).is_err()); } #[test] -#[ignore] +#[ignore = "PharData::new() (crates/shirabe-php-shim/src/phar.rs:91) is still todo!(), which Tar::get_composer_json depends on for every fixture"] fn test_returns_composer_json_in_tar_root() { let result = Tar::get_composer_json(&fixture("root.tar.gz")).unwrap(); assert_eq!( @@ -49,7 +49,7 @@ fn test_returns_composer_json_in_tar_root() { } #[test] -#[ignore] +#[ignore = "PharData::new() (crates/shirabe-php-shim/src/phar.rs:91) is still todo!(), which Tar::get_composer_json depends on for every fixture"] fn test_returns_composer_json_in_first_folder() { let result = Tar::get_composer_json(&fixture("folder.tar.gz")).unwrap(); assert_eq!( @@ -59,7 +59,7 @@ fn test_returns_composer_json_in_first_folder() { } #[test] -#[ignore] +#[ignore = "PharData::new() (crates/shirabe-php-shim/src/phar.rs:91) is still todo!(), which Tar::get_composer_json depends on for every fixture"] fn test_multiple_top_level_dirs_is_invalid() { assert!(Tar::get_composer_json(&fixture("multiple.tar.gz")).is_err()); } diff --git a/crates/shirabe/tests/util/url_test.rs b/crates/shirabe/tests/util/url_test.rs index 3691d267..40810675 100644 --- a/crates/shirabe/tests/util/url_test.rs +++ b/crates/shirabe/tests/util/url_test.rs @@ -22,7 +22,6 @@ fn conf(entries: &[(&str, &[&str])]) -> IndexMap<String, PhpMixed> { } #[test] -#[ignore] fn test_update_dist_reference() { for (url, expected_url, c, r#ref) in dist_refs_provider() { let mut config = Config::new(true, None); |
