diff options
Diffstat (limited to 'crates/shirabe/tests')
4 files changed, 7 insertions, 18 deletions
diff --git a/crates/shirabe/tests/package/archiver/archive_manager_test.rs b/crates/shirabe/tests/package/archiver/archive_manager_test.rs index d85fac10..3db1e734 100644 --- a/crates/shirabe/tests/package/archiver/archive_manager_test.rs +++ b/crates/shirabe/tests/package/archiver/archive_manager_test.rs @@ -166,12 +166,8 @@ fn test_unknown_format() { } // ref: ArchiveManagerTest::testArchiveTar / testArchiveCustomFileName. -// -// These drive ArchiveManager::archive end-to-end for the 'tar' format, which dispatches to -// PharArchiver::archive. That builds the archive via PharData, whose build_from_iterator is -// todo!() in the php-shim, so the archiving path cannot run yet. #[test] -#[ignore = "needs PharData tar archiving (new_with_format/build_from_iterator are todo!() in the php-shim) for ArchiveManager::archive('tar', ...)"] +#[ignore = "ArchiveManager::archive always passes buildExcludePatterns' glob excludes (e.g. 'name-*.zip'), which BaseExcludeFilter::generate_pattern turns into look-ahead regexes the regex crate cannot compile"] fn test_archive_tar() { if !git_is_executable() { return; @@ -208,7 +204,7 @@ fn test_archive_tar() { } #[test] -#[ignore = "needs PharData tar archiving (new_with_format/build_from_iterator are todo!() in the php-shim) for ArchiveManager::archive('tar', ...)"] +#[ignore = "ArchiveManager::archive always passes buildExcludePatterns' glob excludes (e.g. 'name-*.zip'), which BaseExcludeFilter::generate_pattern turns into look-ahead regexes the regex crate cannot compile"] fn test_archive_custom_file_name() { if !git_is_executable() { return; diff --git a/crates/shirabe/tests/package/archiver/phar_archiver_test.rs b/crates/shirabe/tests/package/archiver/phar_archiver_test.rs index fe6185d8..39c5087a 100644 --- a/crates/shirabe/tests/package/archiver/phar_archiver_test.rs +++ b/crates/shirabe/tests/package/archiver/phar_archiver_test.rs @@ -1,5 +1,6 @@ //! ref: composer/tests/Composer/Test/Package/Archiver/PharArchiverTest.php +use serial_test::serial; use shirabe::package::archiver::{ArchiverInterface, PharArchiver}; use shirabe::package::handle::CompletePackageHandle; use shirabe::util::{Filesystem, Platform}; @@ -63,8 +64,9 @@ impl ArchiverTestCase { } } -#[ignore = "PharArchiver::archive builds the archive via PharData, which is todo!() in the php-shim"] +#[ignore = "the excludes passed here make BaseExcludeFilter::generate_pattern emit look-ahead regexes ((?=$|/) and Glob's (?=[^\\.])) that the regex crate cannot compile"] #[test] +#[serial] fn test_tar_archive() { let mut test_case = ArchiverTestCase::set_up(); @@ -98,8 +100,8 @@ fn test_tar_archive() { .unwrap(); } -#[ignore = "PharArchiver::archive builds the archive via PharData, which is todo!() in the php-shim"] #[test] +#[serial] fn test_zip_archive() { let mut test_case = ArchiverTestCase::set_up(); diff --git a/crates/shirabe/tests/repository/artifact_repository_test.rs b/crates/shirabe/tests/repository/artifact_repository_test.rs index 2bfe85de..b13f23e9 100644 --- a/crates/shirabe/tests/repository/artifact_repository_test.rs +++ b/crates/shirabe/tests/repository/artifact_repository_test.rs @@ -33,7 +33,6 @@ fn create_repo(url: &str) -> ArtifactRepository { } #[test] -#[ignore = "the artifacts fixtures dir contains a .tar file (jsonInRootTarFile); scanning it routes through Tar::get_composer_json -> PharData::new which is todo!()"] fn test_extracts_configs_from_zip_archives() { if set_up() { return; @@ -83,7 +82,6 @@ fn test_extracts_configs_from_zip_archives() { } #[test] -#[ignore = "the artifacts fixtures dir contains a .tar file (jsonInRootTarFile); scanning it routes through Tar::get_composer_json -> PharData::new which is todo!()"] fn test_absolute_repo_url_creates_absolute_url_packages() { if set_up() { return; @@ -104,7 +102,7 @@ fn test_absolute_repo_url_creates_absolute_url_packages() { } #[test] -#[ignore = "the relative url is resolved from the process cwd (the crate manifest dir under cargo, not the composer test root), so the artifacts dir is not found; additionally the dir contains a .tar file routing through PharData::new which is todo!()"] +#[ignore = "the relative url is resolved from the process cwd (the crate manifest dir under cargo, not the composer test root), so the artifacts dir is not found"] fn test_relative_repo_url_creates_relative_url_packages() { if set_up() { return; diff --git a/crates/shirabe/tests/util/tar_test.rs b/crates/shirabe/tests/util/tar_test.rs index 7a172a7a..50951202 100644 --- a/crates/shirabe/tests/util/tar_test.rs +++ b/crates/shirabe/tests/util/tar_test.rs @@ -12,7 +12,6 @@ fn fixture(name: &str) -> String { } #[test] -#[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 +19,22 @@ fn test_returns_nullif_the_tar_is_not_found() { } #[test] -#[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 = "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 = "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 = "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 +44,6 @@ fn test_returns_composer_json_in_tar_root() { } #[test] -#[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 +53,6 @@ fn test_returns_composer_json_in_first_folder() { } #[test] -#[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()); } |
