aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/classes/tripleo_profile_base_docker_spec.rb15
-rw-r--r--spec/classes/tripleo_profile_base_sshd_spec.rb2
2 files changed, 16 insertions, 1 deletions
diff --git a/spec/classes/tripleo_profile_base_docker_spec.rb b/spec/classes/tripleo_profile_base_docker_spec.rb
index 587cc29..b52fe24 100644
--- a/spec/classes/tripleo_profile_base_docker_spec.rb
+++ b/spec/classes/tripleo_profile_base_docker_spec.rb
@@ -54,6 +54,21 @@ describe 'tripleo::profile::base::docker' do
it_raises 'a Puppet::Error', /You must provide a \$docker_namespace in order to configure insecure registry/
end
+
+ context 'with step 1 and registry_mirror configured' do
+ let(:params) { {
+ :registry_mirror => 'http://foo/bar',
+ :step => 1,
+ } }
+
+ it { is_expected.to contain_class('tripleo::profile::base::docker') }
+ it { is_expected.to contain_package('docker') }
+ it { is_expected.to contain_service('docker') }
+ it {
+ is_expected.to contain_augeas('docker-daemon.json').with_changes(['set dict/entry[. = "registry-mirrors"] "registry-mirrors', "set dict/entry[. = \"registry-mirrors\"]/array/string \"http://foo/bar\""])
+ }
+ end
+
end
on_supported_os.each do |os, facts|
diff --git a/spec/classes/tripleo_profile_base_sshd_spec.rb b/spec/classes/tripleo_profile_base_sshd_spec.rb
index c611fe9..e84a1f5 100644
--- a/spec/classes/tripleo_profile_base_sshd_spec.rb
+++ b/spec/classes/tripleo_profile_base_sshd_spec.rb
@@ -24,7 +24,7 @@ describe 'tripleo::profile::base::sshd' do
context 'it should do nothing' do
it do
- is_expected.to contain_class('ssh')
+ is_expected.to contain_class('ssh::server')
is_expected.to_not contain_file('/etc/issue')
is_expected.to_not contain_file('/etc/issue.net')
is_expected.to_not contain_file('/etc/motd')