Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove docker_version fact and version check #23

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions lib/facter/docker_version.rb

This file was deleted.

6 changes: 0 additions & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@
Optional[Hash] $resources = undef,
Optional[Hash] $users = undef,
) {
$dockerversion = '1.12.0'

if versioncmp($facts['docker_version'], $dockerversion) < 0 {
fail("HBM requires Docker Engine version >=${dockerversion}. Your version is ${facts['docker_version']}.")
}

if $manage_package {
package { 'package_hbm':
ensure => installed,
Expand Down
14 changes: 0 additions & 14 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,5 @@
)
end
end

context "on #{os} with unsupported version of docker" do
let(:facts) do
os_facts.merge(
{
docker_version: '1.11.0',
},
)
end

it 'fail' do
expect { is_expected.to contain_class(:subject) }.to raise_error(Puppet::Error, %r{HBM requires Docker Engine version >=1.12.0. Your version is 1.11.0.})
end
end
end
end
3 changes: 1 addition & 2 deletions spec/default_module_facts.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Use default_module_facts.yml for module specific facts.
#
# Facts specified here will override the values provided by rspec-puppet-facts.
---
docker_version: '1.12.0'
--- {}
Loading