Skip to content

Commit

Permalink
Fixes #35129 - Fix backup tests for Ruby 3.0
Browse files Browse the repository at this point in the history
(cherry picked from commit 9b36cd2)
  • Loading branch information
upadhyeammit committed Jul 12, 2022
1 parent 6a14b19 commit 14f45f9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/lib/utils/backup_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ def assume_feature_absent(label)
end

def feature_with_local_method(label, return_value)
feature = MiniTest::Mock.new
feature.expect(:configuration, 'host' => 'abc.example.com')
feature.expect(:local?, return_value)
ForemanMaintain.detector.stubs(:feature).with(label).returns(feature)
fake_feature = MiniTest::Mock.new
ret_hash = { 'host' => 'abc.example.com' }
fake_feature.expect(:configuration, ret_hash)
fake_feature.expect(:local?, return_value)
ForemanMaintain.detector.stubs(:feature).with(label).returns(fake_feature)
end

it 'Validates katello standard backup' do
Expand Down

0 comments on commit 14f45f9

Please sign in to comment.