diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-04-11 06:10:03 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-04-11 06:10:03 +0000 |
commit | b10fa039b3db88908f3e9501d60750de9ffea073 (patch) | |
tree | 157808418d8f0618e40bf7715413425bb376b5a8 /spec/classes/tripleo_profile_base_docker_spec.rb | |
parent | dc6eedcb50b4ddbd0ef27e6cc24e2d2889ae0985 (diff) | |
parent | 936aece1de21a5c333b93d711444200c00e2419f (diff) |
Merge "Add registry_mirror to base::docker profile"
Diffstat (limited to 'spec/classes/tripleo_profile_base_docker_spec.rb')
-rw-r--r-- | spec/classes/tripleo_profile_base_docker_spec.rb | 15 |
1 files changed, 15 insertions, 0 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| |