Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp committed Jun 18, 2024
1 parent 5a344e9 commit 66f1b17
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions gems/aws-sdk-core/spec/shared_spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@
config.include Sigv4Helper

config.before(:each) do
# Clear the current ENV to avoid loading credentials and other configs.
path = ENV['PATH'] # necessary for JRuby
original_env = ENV.to_h
ENV.clear
ENV['PATH'] = path
# Clear the current ENV to avoid loading credentials.
ENV.keep_if { |k, _| k == 'PATH' }

# disable loading credentials from shared file
allow(Dir).to receive(:home).and_raise(ArgumentError)
Expand All @@ -39,11 +36,6 @@
allow_any_instance_of(Aws::InstanceProfileCredentials).to receive(:warn)

Aws.shared_config.fresh

# Restore the original ENV
original_env.each do |key, value|
ENV[key] = value
end
end

# Thread.report_on_exception was set to default true in Ruby 2.5
Expand Down

0 comments on commit 66f1b17

Please sign in to comment.