Skip to content

Commit

Permalink
(PE-14554) Switch default to meep
Browse files Browse the repository at this point in the history
If INSTALLER_TYPE is not set, beaker-pe will now default to a meep
install.  You must set INSTALLER_TYPE to 'legacy' to get a legacy
install out of Beaker with this patch.
  • Loading branch information
jpartlow committed Jun 1, 2016
1 parent 0d6b6d4 commit f234e5f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
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 @@ -519,7 +519,7 @@ def do_install hosts, opts = {}
#
# And then to just >= 2016.2.0 for cutover.
def use_meep?(version)
!version_is_less(version, MEEP_CUTOVER_VERSION) && ENV['INSTALLER_TYPE'] == 'meep'
!version_is_less(version, MEEP_CUTOVER_VERSION) && ENV['INSTALLER_TYPE'] != 'legacy'
end

# Set installer options on the passed *host* according to current
Expand Down
24 changes: 24 additions & 0 deletions spec/beaker-pe/install/pe_utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,13 @@ def slice_installer_options(host)
it 'sets legacy settings' do
expect(slice_installer_options(host)).to eq(legacy_settings)
end

it 'test use_meep?' do
expect(subject.use_meep?('3.8.5')).to eq(false)
expect(subject.use_meep?('2016.1.2')).to eq(false)
expect(subject.use_meep?('2016.2.0')).to eq(false)
expect(subject.use_meep?('2016.2.0-rc1-gabcdef')).to eq(false)
end
end

context 'and ENV["INSTALLER_TYPE"]=="meep"' do
Expand All @@ -382,6 +389,23 @@ def slice_installer_options(host)
expect(slice_installer_options(host)).to eq(meep_settings)
end
end

context 'and ENV["INSTALLER_TYPE"] is not set' do
before(:each) do
ENV.delete('INSTALLER_TYPE')
end

it 'sets meep settings' do
expect(slice_installer_options(host)).to eq(meep_settings)
end

it 'test use_meep?' do
expect(subject.use_meep?('3.8.5')).to eq(false)
expect(subject.use_meep?('2016.1.2')).to eq(false)
expect(subject.use_meep?('2016.2.0')).to eq(true)
expect(subject.use_meep?('2016.2.0-rc1-gabcdef')).to eq(true)
end
end
end
end

Expand Down

0 comments on commit f234e5f

Please sign in to comment.