Skip to content

Commit

Permalink
(PE-19049) Remove get_console_dispatcher_for_beaker_pe specs
Browse files Browse the repository at this point in the history
Because scooter can in fact be in the bundle based on the GEM_SOURCE
setting, these specs can break, and it is not worth the effort reworking
the tests to be conditional based on presence or absence of the scooter
gem. RE-8616 should make the scooter gem public and then we don't need
to dance around it like this.
  • Loading branch information
jpartlow committed Mar 10, 2017
1 parent 570694d commit e3515a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
4 changes: 2 additions & 2 deletions lib/beaker-pe/install/pe_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1099,10 +1099,10 @@ def fetch_and_push_pe(host, path, filename, extension, local_dir='tmp/pe')
# Being able to modify PE's classifier requires the Scooter gem and
# helpers which are in beaker-pe-large-environments.
def get_console_dispatcher_for_beaker_pe(raise_exception = false)
# XXX RE-8616, once scooter is public, we can remove this and just
# reference ConsoleDispatcher directly.
if !respond_to?(:get_dispatcher)
begin
# just in case scooter is present but beaker-pe-large-environments is not
# ...most likely this will raise a LoadError...
require 'scooter'
Scooter::HttpDispatchers::ConsoleDispatcher.new(dashboard)
rescue LoadError => e
Expand Down
14 changes: 0 additions & 14 deletions spec/beaker-pe/install/pe_utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1598,20 +1598,6 @@ def test_setup(mock_values)
end
end

describe 'get_console_dispatcher_for_beaker_pe' do
it { expect(subject.get_console_dispatcher_for_beaker_pe).to be_nil }
it do
expect { subject.get_console_dispatcher_for_beaker_pe(true) }.to(
raise_exception(LoadError, /cannot load.*scooter/)
)
end
it do
expect { subject.get_console_dispatcher_for_beaker_pe! }.to(
raise_exception(LoadError, /cannot load.*scooter/)
)
end
end

def assert_meep_conf_edit(input, output, path, &test)
# mock reading pe.conf
expect(master).to receive(:exec).with(
Expand Down

0 comments on commit e3515a0

Please sign in to comment.