mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
16e6d7d186
We have seen some errors during test `setup` before `@tempdir` is actually set, in particular, when instantiating `Gem::MockUI` which in turn requires `stringio`. In this case, the `teardown` method will also produce an error because it tries to remove the `@tempdir`, which has not been set, so tries to remove a `nil` directory. It results in a confusing error like ``` <internal:D:/a/rubygems/rubygems/lib/rubygems/core_ext/kernel_require.rb>:85:in `require': Interrupt Error: test_bump_one_level(TestGemVersion): TypeError: no implicit conversion of nil into String C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:1570:in `path' from <internal:D:/a/rubygems/rubygems/lib/rubygems/core_ext/kernel_require.rb>:85:in `require' C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:1570:in `block in fu_list' from D:/a/rubygems/rubygems/lib/rubygems/mock_gem_ui.rb:43:in `initialize' C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:1570:in `map' from D:/a/rubygems/rubygems/test/rubygems/helper.rb:323:in `new' C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:1570:in `fu_list' from D:/a/rubygems/rubygems/test/rubygems/helper.rb:323:in `setup' C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:616:in `rm_r' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:284:in `run_fixture_callback' C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/3.1.0/fileutils.rb:638:in `rm_rf' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:272:in `block in create_fixtures_runner' D:/a/rubygems/rubygems/test/rubygems/helper.rb:462:in `teardown' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner' =============================================================================== from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:257:in `run_fixture' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/fixture.rb:292:in `run_setup' Finished in 683.0312862 seconds. from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testcase.rb:564:in `block in run' ------------------------------------------------------------------------------- from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testcase.rb:563:in `catch' 2185 tests, 5929 assertions, 0 failures, 1 errors, 28 pendings, 0 omissions, 0 notifications from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testcase.rb:563:in `run' 98.7185% passed from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:124:in `run_test' ------------------------------------------------------------------------------- from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:53:in `run' 3.20 tests/s, 8.68 assertions/sTerminate batch job (Y/N)? from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:124:in `run_test' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:53:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:124:in `run_test' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/testsuite.rb:53:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:67:in `run_suite' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:45:in `block (2 levels) in run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:102:in `with_listener' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:41:in `block in run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:39:in `catch' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnermediator.rb:39:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunner.rb:40:in `start_mediator' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunner.rb:25:in `start' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/ui/testrunnerutilities.rb:24:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:458:in `block in run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:514:in `change_work_directory' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:457:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit/autorunner.rb:66:in `run' from C:/hostedtoolcache/windows/Ruby/3.1.1/x64/lib/ruby/gems/3.1.0/gems/test-unit-3.5.3/lib/test/unit.rb:518:in `block (2 levels) in <top (required)>' rake aborted! Interrupt: ``` The should make this same error much cleaner if it happens again. https://github.com/rubygems/rubygems/commit/fa649d22e8 |
||
---|---|---|
.. | ||
data | ||
fake_certlib | ||
foo | ||
package | ||
packages | ||
plugin | ||
rubygems/commands | ||
sff | ||
specifications | ||
alternate_cert.pem | ||
alternate_cert_32.pem | ||
alternate_key.pem | ||
bad_rake.rb | ||
ca_cert.pem | ||
child_cert.pem | ||
child_cert_32.pem | ||
child_key.pem | ||
client.pem | ||
encrypted_private_key.pem | ||
expired_cert.pem | ||
future_cert.pem | ||
future_cert_32.pem | ||
good_rake.rb | ||
grandchild_cert.pem | ||
grandchild_cert_32.pem | ||
grandchild_key.pem | ||
helper.rb | ||
installer_test_case.rb | ||
invalid_client.pem | ||
invalid_issuer_cert.pem | ||
invalid_issuer_cert_32.pem | ||
invalid_key.pem | ||
invalid_signer_cert.pem | ||
invalid_signer_cert_32.pem | ||
invalidchild_cert.pem | ||
invalidchild_cert_32.pem | ||
invalidchild_key.pem | ||
private3072_key.pem | ||
private_ec_key.pem | ||
private_key.pem | ||
public3072_cert.pem | ||
public_cert.pem | ||
public_cert_32.pem | ||
public_key.pem | ||
rubygems_plugin.rb | ||
simple_gem.rb | ||
ssl_cert.pem | ||
ssl_key.pem | ||
test_bundled_ca.rb | ||
test_config.rb | ||
test_deprecate.rb | ||
test_exit.rb | ||
test_gem.rb | ||
test_gem_available_set.rb | ||
test_gem_bundler_version_finder.rb | ||
test_gem_command.rb | ||
test_gem_command_manager.rb | ||
test_gem_commands_build_command.rb | ||
test_gem_commands_cert_command.rb | ||
test_gem_commands_check_command.rb | ||
test_gem_commands_cleanup_command.rb | ||
test_gem_commands_contents_command.rb | ||
test_gem_commands_dependency_command.rb | ||
test_gem_commands_environment_command.rb | ||
test_gem_commands_fetch_command.rb | ||
test_gem_commands_generate_index_command.rb | ||
test_gem_commands_help_command.rb | ||
test_gem_commands_info_command.rb | ||
test_gem_commands_install_command.rb | ||
test_gem_commands_list_command.rb | ||
test_gem_commands_lock_command.rb | ||
test_gem_commands_mirror.rb | ||
test_gem_commands_open_command.rb | ||
test_gem_commands_outdated_command.rb | ||
test_gem_commands_owner_command.rb | ||
test_gem_commands_pristine_command.rb | ||
test_gem_commands_push_command.rb | ||
test_gem_commands_query_command.rb | ||
test_gem_commands_search_command.rb | ||
test_gem_commands_server_command.rb | ||
test_gem_commands_setup_command.rb | ||
test_gem_commands_signin_command.rb | ||
test_gem_commands_signout_command.rb | ||
test_gem_commands_sources_command.rb | ||
test_gem_commands_specification_command.rb | ||
test_gem_commands_stale_command.rb | ||
test_gem_commands_uninstall_command.rb | ||
test_gem_commands_unpack_command.rb | ||
test_gem_commands_update_command.rb | ||
test_gem_commands_which_command.rb | ||
test_gem_commands_yank_command.rb | ||
test_gem_config_file.rb | ||
test_gem_dependency.rb | ||
test_gem_dependency_installer.rb | ||
test_gem_dependency_list.rb | ||
test_gem_dependency_resolution_error.rb | ||
test_gem_doctor.rb | ||
test_gem_ext_builder.rb | ||
test_gem_ext_cmake_builder.rb | ||
test_gem_ext_configure_builder.rb | ||
test_gem_ext_ext_conf_builder.rb | ||
test_gem_ext_rake_builder.rb | ||
test_gem_gem_runner.rb | ||
test_gem_gemcutter_utilities.rb | ||
test_gem_impossible_dependencies_error.rb | ||
test_gem_indexer.rb | ||
test_gem_install_update_options.rb | ||
test_gem_installer.rb | ||
test_gem_local_remote_options.rb | ||
test_gem_name_tuple.rb | ||
test_gem_package.rb | ||
test_gem_package_old.rb | ||
test_gem_package_tar_header.rb | ||
test_gem_package_tar_reader.rb | ||
test_gem_package_tar_reader_entry.rb | ||
test_gem_package_tar_writer.rb | ||
test_gem_package_task.rb | ||
test_gem_path_support.rb | ||
test_gem_platform.rb | ||
test_gem_rdoc.rb | ||
test_gem_remote_fetcher.rb | ||
test_gem_request.rb | ||
test_gem_request_connection_pools.rb | ||
test_gem_request_set.rb | ||
test_gem_request_set_gem_dependency_api.rb | ||
test_gem_request_set_lockfile.rb | ||
test_gem_request_set_lockfile_parser.rb | ||
test_gem_request_set_lockfile_tokenizer.rb | ||
test_gem_requirement.rb | ||
test_gem_resolver.rb | ||
test_gem_resolver_activation_request.rb | ||
test_gem_resolver_api_set.rb | ||
test_gem_resolver_api_specification.rb | ||
test_gem_resolver_best_set.rb | ||
test_gem_resolver_composed_set.rb | ||
test_gem_resolver_conflict.rb | ||
test_gem_resolver_dependency_request.rb | ||
test_gem_resolver_git_set.rb | ||
test_gem_resolver_git_specification.rb | ||
test_gem_resolver_index_set.rb | ||
test_gem_resolver_index_specification.rb | ||
test_gem_resolver_installed_specification.rb | ||
test_gem_resolver_installer_set.rb | ||
test_gem_resolver_local_specification.rb | ||
test_gem_resolver_lock_set.rb | ||
test_gem_resolver_lock_specification.rb | ||
test_gem_resolver_requirement_list.rb | ||
test_gem_resolver_specification.rb | ||
test_gem_resolver_vendor_set.rb | ||
test_gem_resolver_vendor_specification.rb | ||
test_gem_security.rb | ||
test_gem_security_policy.rb | ||
test_gem_security_signer.rb | ||
test_gem_security_trust_dir.rb | ||
test_gem_silent_ui.rb | ||
test_gem_source.rb | ||
test_gem_source_fetch_problem.rb | ||
test_gem_source_git.rb | ||
test_gem_source_installed.rb | ||
test_gem_source_list.rb | ||
test_gem_source_local.rb | ||
test_gem_source_lock.rb | ||
test_gem_source_specific_file.rb | ||
test_gem_source_subpath_problem.rb | ||
test_gem_source_vendor.rb | ||
test_gem_spec_fetcher.rb | ||
test_gem_specification.rb | ||
test_gem_stream_ui.rb | ||
test_gem_stub_specification.rb | ||
test_gem_text.rb | ||
test_gem_uninstaller.rb | ||
test_gem_unsatisfiable_dependency_error.rb | ||
test_gem_uri.rb | ||
test_gem_uri_formatter.rb | ||
test_gem_util.rb | ||
test_gem_validator.rb | ||
test_gem_version.rb | ||
test_gem_version_option.rb | ||
test_kernel.rb | ||
test_project_sanity.rb | ||
test_remote_fetch_error.rb | ||
test_require.rb | ||
test_rubygems.rb | ||
utilities.rb | ||
wrong_key_cert.pem | ||
wrong_key_cert_32.pem |