diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 04:41:01 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 04:41:01 +0900 |
| commit | a5b5366492d87ebf3fd0b1aaf77c15dfa978ae95 (patch) | |
| tree | af993f05750537f53b9cbce3457715128599f0ea /crates/shirabe/tests/repository/vcs/gitlab_driver_test.rs | |
| parent | 46ff68a20235cb6ba05d00b001f334abc303eef8 (diff) | |
| download | php-shirabe-a5b5366492d87ebf3fd0b1aaf77c15dfa978ae95.tar.gz php-shirabe-a5b5366492d87ebf3fd0b1aaf77c15dfa978ae95.tar.zst php-shirabe-a5b5366492d87ebf3fd0b1aaf77c15dfa978ae95.zip | |
test(repository): port VCS driver tests (Git/GitHub/GitLab/Bitbucket/Svn/Perforce/Forgejo)
Svn/GitBitbucket/Perforce supports pass. GitHub::supports reaches non-strict
in_array (todo!()) and Forgejo::supports uses a regex the regex crate cannot
compile, so those are ignored. All API-driven cases mock the HttpDownloader
(curl) / ProcessExecutor and are stubbed. setUp/tearDown not ported.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/repository/vcs/gitlab_driver_test.rs')
| -rw-r--r-- | crates/shirabe/tests/repository/vcs/gitlab_driver_test.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/crates/shirabe/tests/repository/vcs/gitlab_driver_test.rs b/crates/shirabe/tests/repository/vcs/gitlab_driver_test.rs index 7543394..a9432c4 100644 --- a/crates/shirabe/tests/repository/vcs/gitlab_driver_test.rs +++ b/crates/shirabe/tests/repository/vcs/gitlab_driver_test.rs @@ -1 +1,33 @@ //! ref: composer/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php + +// All cases either mock the HttpDownloader/IO to return GitLab API responses (a real +// HttpDownloader reaches curl_multi_init, todo!()), or — for testSupports — rely on the +// gitlab-domains configured in setUp plus the openssl extension, which are not modeled. + +macro_rules! gitlab_stub { + ($name:ident) => { + #[test] + #[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] + fn $name() { + todo!() + } + }; +} + +gitlab_stub!(test_initialize); +gitlab_stub!(test_initialize_public_project); +gitlab_stub!(test_initialize_public_project_as_anonymous); +gitlab_stub!(test_initialize_with_port_number); +gitlab_stub!(test_invalid_support_data); +gitlab_stub!(test_get_dist); +gitlab_stub!(test_get_source); +gitlab_stub!(test_get_source_given_public_project); +gitlab_stub!(test_get_tags); +gitlab_stub!(test_get_paginated_refs); +gitlab_stub!(test_get_branches); +gitlab_stub!(test_supports); +gitlab_stub!(test_gitlab_sub_directory); +gitlab_stub!(test_gitlab_sub_group); +gitlab_stub!(test_gitlab_sub_directory_sub_group); +gitlab_stub!(test_forwards_options); +gitlab_stub!(test_protocol_override_repository_url_generation); |
