From 1936ccd4ee01ac7ef043c525753e06ce328aa529 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 04:24:02 +0900 Subject: test: port GitHub/GitLab/Forgejo, Search/CheckPlatformReqs, ZipArchiver stubs All ignored/todo!(): the auth-util tests mock IO/Config/HttpDownloader, the command tests need ApplicationTester, and ZipArchiver builds a zip via ZipArchive (todo!()). setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/tests/util/forgejo_test.rs | 16 ++++++++++++++++ crates/shirabe/tests/util/github_test.rs | 16 ++++++++++++++++ crates/shirabe/tests/util/gitlab_test.rs | 16 ++++++++++++++++ crates/shirabe/tests/util/main.rs | 3 +++ 4 files changed, 51 insertions(+) (limited to 'crates/shirabe/tests/util') diff --git a/crates/shirabe/tests/util/forgejo_test.rs b/crates/shirabe/tests/util/forgejo_test.rs index 9965d36..2cae2ac 100644 --- a/crates/shirabe/tests/util/forgejo_test.rs +++ b/crates/shirabe/tests/util/forgejo_test.rs @@ -1 +1,17 @@ //! ref: composer/tests/Composer/Test/Util/ForgejoTest.php + +// Both cases construct Forgejo with a mocked IO/Config/JsonConfigSource and a mocked +// HttpDownloader to drive the username/password authentication flow. Mocking is not +// available, and a real HttpDownloader reaches curl_multi_init (todo!()). + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader for the auth flow; a real HttpDownloader reaches curl_multi_init (todo!())"] +fn test_username_password_authentication_flow() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader for the auth flow; a real HttpDownloader reaches curl_multi_init (todo!())"] +fn test_username_password_failure() { + todo!() +} diff --git a/crates/shirabe/tests/util/github_test.rs b/crates/shirabe/tests/util/github_test.rs index 9a3271a..019b858 100644 --- a/crates/shirabe/tests/util/github_test.rs +++ b/crates/shirabe/tests/util/github_test.rs @@ -1 +1,17 @@ //! ref: composer/tests/Composer/Test/Util/GitHubTest.php + +// Both cases construct GitHub with a mocked IO/Config/JsonConfigSource and a mocked +// HttpDownloader to drive the username/password authentication flow. Mocking is not +// available, and a real HttpDownloader reaches curl_multi_init (todo!()). + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader for the auth flow; a real HttpDownloader reaches curl_multi_init (todo!())"] +fn test_username_password_authentication_flow() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader for the auth flow; a real HttpDownloader reaches curl_multi_init (todo!())"] +fn test_username_password_failure() { + todo!() +} diff --git a/crates/shirabe/tests/util/gitlab_test.rs b/crates/shirabe/tests/util/gitlab_test.rs index 2f42f47..27b7258 100644 --- a/crates/shirabe/tests/util/gitlab_test.rs +++ b/crates/shirabe/tests/util/gitlab_test.rs @@ -1 +1,17 @@ //! ref: composer/tests/Composer/Test/Util/GitLabTest.php + +// Both cases construct GitLab with a mocked IO/Config/JsonConfigSource and a mocked +// HttpDownloader to drive the username/password authentication flow. Mocking is not +// available, and a real HttpDownloader reaches curl_multi_init (todo!()). + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader for the auth flow; a real HttpDownloader reaches curl_multi_init (todo!())"] +fn test_username_password_authentication_flow() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader for the auth flow; a real HttpDownloader reaches curl_multi_init (todo!())"] +fn test_username_password_failure() { + todo!() +} diff --git a/crates/shirabe/tests/util/main.rs b/crates/shirabe/tests/util/main.rs index 1955f8d..cacd1a2 100644 --- a/crates/shirabe/tests/util/main.rs +++ b/crates/shirabe/tests/util/main.rs @@ -1,6 +1,9 @@ mod config_validator_test; mod error_handler_test; +mod forgejo_test; mod forgejo_url_test; +mod github_test; +mod gitlab_test; mod http; mod http_downloader_test; mod ini_helper_test; -- cgit v1.3.1