aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/util/gitlab_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-24 20:23:05 +0900
committernsfisis <nsfisis@gmail.com>2026-07-24 20:23:05 +0900
commit4ddeca53cca2c6764283c3a32c74f8e689cc5b9c (patch)
tree6b3df3b3cad5b369b4c36b5554db10193adcfef3 /crates/shirabe/tests/util/gitlab_test.rs
parent93733a249437e63774ac1989e0544b2d422e13b3 (diff)
downloadphp-shirabe-4ddeca53cca2c6764283c3a32c74f8e689cc5b9c.tar.gz
php-shirabe-4ddeca53cca2c6764283c3a32c74f8e689cc5b9c.tar.zst
php-shirabe-4ddeca53cca2c6764283c3a32c74f8e689cc5b9c.zip
fix(installer-test): port InstallerTest::setUp's chdir(__DIR__)
PHP's InstallerTest::setUp() does chdir(__DIR__) before every test so relative "type": "path" repository URLs in fixtures resolve against composer/tests/Composer/Test; tearDown() restores the previous cwd. This was never ported, only the env-var clears were, so any fixture declaring a relative path repo failed at PathRepository::initialize() with "the `url` supplied for the path (...) repository does not exist" — not a missing PathRepository feature, just an unset cwd. Turned TearDown into a real guard that captures and chdirs on construction and restores on Drop. Since set_current_dir is process-wide state and tests run concurrently by default, added #[serial] to test_installer (the only call site not already inside a #[serial] macro-generated fn) so no two TearDown-holding tests can race on cwd; serial_test's plain #[serial] shares one unnamed lock across the whole binary, so this is sufficient.
Diffstat (limited to 'crates/shirabe/tests/util/gitlab_test.rs')
0 files changed, 0 insertions, 0 deletions