From 93293043f135dec5a972378682b9e947fba7c4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 29 Apr 2020 14:18:59 +0200 Subject: [rubygems/rubygems] Remove unneeded global teardown Instead, make each test cleanup after itself. https://github.com/rubygems/rubygems/commit/e0aba9d64f --- test/rubygems/test_gem_commands_build_command.rb | 2 ++ test/rubygems/test_gem_commands_cert_command.rb | 4 ++++ test/rubygems/test_gem_commands_owner_command.rb | 6 ++++++ test/rubygems/test_gem_commands_push_command.rb | 2 ++ test/rubygems/test_gem_commands_signin_command.rb | 4 ++-- test/rubygems/test_gem_commands_yank_command.rb | 6 ++++++ test/rubygems/test_gem_config_file.rb | 2 ++ test/rubygems/test_gem_gemcutter_utilities.rb | 2 ++ test/rubygems/test_gem_source.rb | 2 +- test/rubygems/test_gem_spec_fetcher.rb | 2 +- 10 files changed, 28 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/rubygems/test_gem_commands_build_command.rb b/test/rubygems/test_gem_commands_build_command.rb index 76ede1466f..ac5d2ddd16 100644 --- a/test/rubygems/test_gem_commands_build_command.rb +++ b/test/rubygems/test_gem_commands_build_command.rb @@ -398,6 +398,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase skip 'openssl is missing' unless defined?(OpenSSL::SSL) && !java_platform? gem_path = File.join Gem.user_home, ".gem" + Dir.mkdir gem_path Gem::Security.trust_dir @@ -441,6 +442,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase skip 'openssl is missing' unless defined?(OpenSSL::SSL) && !java_platform? gem_path = File.join Gem.user_home, ".gem" + Dir.mkdir gem_path Gem::Security.trust_dir diff --git a/test/rubygems/test_gem_commands_cert_command.rb b/test/rubygems/test_gem_commands_cert_command.rb index bb9ed9e630..fd1e66b915 100644 --- a/test/rubygems/test_gem_commands_cert_command.rb +++ b/test/rubygems/test_gem_commands_cert_command.rb @@ -597,6 +597,7 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis def test_execute_re_sign gem_path = File.join Gem.user_home, ".gem" + Dir.mkdir gem_path path = File.join @tempdir, 'cert.pem' Gem::Security.write EXPIRED_PUBLIC_CERT, path, 0600 @@ -627,6 +628,9 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis end def test_execute_re_sign_with_cert_expiration_length_days + gem_path = File.join Gem.user_home, ".gem" + Dir.mkdir gem_path + path = File.join @tempdir, 'cert.pem' Gem::Security.write EXPIRED_PUBLIC_CERT, path, 0600 diff --git a/test/rubygems/test_gem_commands_owner_command.rb b/test/rubygems/test_gem_commands_owner_command.rb index 685365ed3b..b830916fbe 100644 --- a/test/rubygems/test_gem_commands_owner_command.rb +++ b/test/rubygems/test_gem_commands_owner_command.rb @@ -19,6 +19,12 @@ class TestGemCommandsOwnerCommand < Gem::TestCase @cmd = Gem::Commands::OwnerCommand.new end + def teardown + credential_teardown + + super + end + def test_show_owners response = <