Skip to content

Commit

Permalink
Merge pull request #24 from kevpl/bkr922_bkr908_fix
Browse files Browse the repository at this point in the history
(BKR-922) fixed options reference for beaker-rspec
  • Loading branch information
tvpartytonight authored Aug 24, 2016
2 parents b8eff18 + bd23225 commit baff328
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/beaker-pe/install/pe_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ def check_puppetdb_status_endpoint(host)
def check_console_status_endpoint(host)
return true if version_is_less(host['pe_ver'], '2015.2.0')

attempts_limit = @options[:pe_console_status_attempts] || 9
attempts_limit = options[:pe_console_status_attempts] || 9
step 'Check Console Status Endpoint' do
match = repeat_fibonacci_style_for(attempts_limit) do
output = on(host, "curl -s -k https://localhost:4433/status/v1/services --cert /etc/puppetlabs/puppet/ssl/certs/#{host}.pem --key /etc/puppetlabs/puppet/ssl/private_keys/#{host}.pem --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem", :accept_all_exit_codes => true)
Expand Down
8 changes: 4 additions & 4 deletions spec/beaker-pe/install/pe_utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ def slice_installer_options(host)
it 'allows the number of attempts to be configured via the global options' do
attempts = 37819
options = {:pe_console_status_attempts => attempts}
subject.instance_variable_set(:@options, options)
allow(subject).to receive(:options).and_return(options)
allow(subject).to receive(:version_is_less).and_return(false)
allow(subject).to receive(:fail_test)

Expand All @@ -1224,7 +1224,7 @@ def slice_installer_options(host)
end

it 'yields false to repeat_fibonacci_style_for when conditions are not true' do
subject.instance_variable_set(:@options, {})
allow(subject).to receive(:options).and_return({})
allow(subject).to receive(:version_is_less).and_return(false)
allow(subject).to receive(:sleep)

Expand All @@ -1240,7 +1240,7 @@ def slice_installer_options(host)
end

it 'yields false to repeat_fibonacci_style_for when JSON::ParserError occurs' do
subject.instance_variable_set(:@options, {})
allow(subject).to receive(:options).and_return({})
allow(subject).to receive(:version_is_less).and_return(false)
allow(subject).to receive(:sleep)

Expand All @@ -1253,7 +1253,7 @@ def slice_installer_options(host)
end

it 'calls fail_test when no checks pass' do
subject.instance_variable_set(:@options, {})
allow(subject).to receive(:options).and_return({})
allow(subject).to receive(:version_is_less).and_return(false)

allow(subject).to receive(:repeat_fibonacci_style_for).and_return(false)
Expand Down

0 comments on commit baff328

Please sign in to comment.