Created
February 6, 2017 11:02
-
-
Save rgarrigue/9885fd35607532eb687027c3deef7cf9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'profiles::docker' do | |
context 'supported operating systems' do | |
on_supported_os.each do |os, facts| | |
context "on #{os}" do | |
let(:facts) do | |
facts.merge({ | |
:clientcert => 'docker', | |
}) | |
end | |
context "roles with default parameters" do | |
it { is_expected.to compile.with_all_deps } | |
it { is_expected.to contain_class('docker').with({'tcp_bind' => nil})} | |
end | |
context "with parameter remote parameter" do | |
let(:params) do | |
{:remote => true} | |
end | |
it { is_expected.to compile.with_all_deps } | |
it { is_expected.to contain_class('docker').with({'tcp_bind' => 'tcp://0.0.0.0:2376'})} | |
it { is_expected.to contain_firewalld_port('Open port docker in the public zone') } | |
# dependencies transitive | |
it { is_expected.to contain_package('docker') } | |
it { is_expected.to contain_package('device-mapper') } | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment